Compare commits

..

286 Commits

Author SHA1 Message Date
Tianxin Dong
8f35596872 Fix: fix panic if trait tries to patch an invalid workload like terraform (#5329)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-19 14:40:49 +08:00
github-actions[bot]
18c2fa15a2 fix: fix --cluster when addon enable (#5339)
Signed-off-by: zhaowei.wang <zhaowei.wang@metabit-trading.com>
(cherry picked from commit 021ca69cfd)

Co-authored-by: zhaowei.wang <zhaowei.wang@metabit-trading.com>
2023-01-13 17:06:50 +08:00
Somefive
18d93039c9 [Backport release-1.4] Fix: gc failure cause workflow restart not working properly (#5241) (#5243)
* Fix: gc failure cause workflow restart not working properly

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

* Feat: switch ci machine

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

* Fix: enhance test

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

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

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-01-03 20:01:29 +08:00
github-actions[bot]
8ffd80e4a7 Fix:Dry-run from revision application,Problems caused by resource version lower than the current version (#5249)
Signed-off-by: old.prince <di7zhang@gmail.com>
(cherry picked from commit d5fcb04147)

Co-authored-by: oldprince <di7zhang@gmail.com>
2023-01-03 11:36:57 +08:00
github-actions[bot]
735075f5a6 [Backport release-1.5] Fix: forbid 302 request to avoid SSRF (#5003)
* fix helm chart list endpoint SSRF CVE

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit 8883a6219d)

* revert error log

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit e1e6972b17)

* change with const value

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

fix ci

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit fbeacb0a6b)

Co-authored-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-11-04 20:16:53 +08:00
github-actions[bot]
52d1a4364b fix gitlab addon registry (#4938)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit f3ee964734)

Co-authored-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-10-27 22:19:34 +08:00
github-actions[bot]
1b7f9aae65 [Backport release-1.5] Chore: wrong endpoint for LoadBalancer type service(revert #4729) (#4906)
* Chore: wrong endpoint for LoadBalancer type service(revert #4729)

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 92ed75c863)

* Fix: change the unit test

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 7985353e1d)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-22 13:27:07 +08:00
github-actions[bot]
e94519b788 Chore: change the package name of the readme-generator-for-helm (#4896)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 8b46e6076a)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-20 16:37:25 +08:00
Somefive
18d755ed72 Fix: #4865 (#4867)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-10-15 13:18:43 +08:00
Somefive
c15d0e4e0f Fix: prevent rerun application while upgrading due to old apprev lack app workflow (#4865)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-10-14 22:16:51 +08:00
github-actions[bot]
82ce9daf38 Fix: support default value of ui schema (#4859)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
(cherry picked from commit e584a35c83)

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-10-13 14:45:47 +08:00
github-actions[bot]
6eef47c5e0 [Backport release-1.5] Fix: change LabelResourceRuleFormat from Annotations to Labels (#4855)
* fix: change Annotations to Labels

Signed-off-by: chengleqi <chengleqi5g@hotmail.com>
(cherry picked from commit 73696d8c04)

* fix: add FormatYAML label for test case

Signed-off-by: chengleqi <chengleqi5g@hotmail.com>
(cherry picked from commit 32b6ba2c41)

* add json format rules test case

Signed-off-by: chengleqi <chengleqi5g@hotmail.com>
(cherry picked from commit cf207da2b9)

Co-authored-by: chengleqi <chengleqi5g@hotmail.com>
2022-10-12 15:28:34 +08:00
Jianbo Sun
7728de933b Fix: align sha256sums file with binary name (#4835)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-10-09 10:41:42 +08:00
github-actions[bot]
5ceb193ebe Chore: add IP for gateway trait (#4834)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
(cherry picked from commit 93b85480a6)

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-10-09 10:04:57 +08:00
github-actions[bot]
186ab37547 fix bugs and add tests (#4832)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit e6c9e3887f)

Co-authored-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-10-08 17:28:47 +08:00
Somefive
5a98541e8e Feat: workflow will rerun when application workflow changes (#4813)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-09-30 21:22:59 +08:00
github-actions[bot]
d599e63ec9 Feat: add image-pull-policy to init-container (#4812)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit a9ba8bb502)

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2022-09-29 22:43:00 +08:00
Somefive
055a50fad8 Feat: add port name to CollectServiceEndpoints (#4805)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-09-29 13:58:35 +08:00
github-actions[bot]
7921475af2 Fix: add path clean for request (#4800)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit 9d4630ea32)

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2022-09-28 14:23:44 +08:00
github-actions[bot]
caf09b81b0 Fix: it does not check the same name for 'vela env init' (#4798)
Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
(cherry picked from commit a38e6d401b)

Co-authored-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2022-09-28 10:59:26 +08:00
github-actions[bot]
4c525f8e5d [Backport release-1.5] Fix: allow to read definition from user's namespace when force delete (#4789)
* Fix: allow to read definition from user's namespace when force deleting app with configuration

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 2f08c36132)

* Fix test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 981950a14d)

* Fix wrong test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 62863f1007)

Co-authored-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-09-27 11:58:44 +08:00
github-actions[bot]
bdf71bb290 [Backport release-1.5] Fix: memory leak of the apiserver (#4777)
* Fix: memory leak of the apiserver

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 0a8a70730f)

* Fix: listen to the context done event

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit dfb81224cb)

* Fix: remove the shutdown code

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit a331b2c54a)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-09-23 17:14:10 +08:00
Somefive
5873ba4c47 [Backport 1.5] Fix: gc legacy rt with regularization (#4768)
* Fix: gc legacy rt with regularization

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

* Test: add test

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

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-09-23 16:42:47 +08:00
github-actions[bot]
9ded3c9d3e Update definition.go (#4767)
fix bug, use labels to replace annotation

(cherry picked from commit 8f395d843c)

Co-authored-by: Hair1ossTeenager <45008570+Hair1ossTeenager@users.noreply.github.com>
2022-09-21 10:29:37 +08:00
github-actions[bot]
56c2827669 Fix: auth lack perm for rollout (#4764)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit b538850eec)

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2022-09-20 20:35:20 +08:00
Somefive
b6a7d8621f Fix: disable workflow rerun when app spec struct change (#4754)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-09-20 15:43:38 +08:00
barnettZQG
b80f673f69 Fix: query the resource duplicately (#4714) (#4750)
* Fix: query the resource duplicately

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

* Fix: add an e2e test case

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

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

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-09-19 16:14:34 +08:00
barnettZQG
e14dd09872 Fix: nil pointer dereference (#4735)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-09-19 15:45:28 +08:00
qiaozp
e31bacbb05 Fix: show command caused by wrong backport (#4749)
* Fix show command caused by wrong backport

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

* fmt

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

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-09-19 12:07:39 +08:00
github-actions[bot]
e602c0420b Fix: panic when properties empty (#4748)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit 13fec3cb18)

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2022-09-19 11:18:55 +08:00
github-actions[bot]
68e3c7cfc7 [Backport release-1.5] Fix: wrong endpoint for LoadBalancer type service (#4738)
* Fix: wrong endpoint for LoadBalancer type service

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

Fix test

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

fix test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 2d511b7ae8)

* fix test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit cbea03fb27)

* fix cli test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 145ea3a237)

Co-authored-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-09-16 16:58:07 +08:00
github-actions[bot]
a5b8cfc9fb [Backport release-1.5] Fix: vela show panic for component markdown format (#4726)
* Fix: vela show panic for component markdown format

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 71f08ccfc7)

* move code

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 2b64a9e8bc)

Co-authored-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-09-15 09:55:03 +08:00
barnettZQG
fce308d234 Fix: CVE-2022-27664 (#4721) (#4723)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-09-14 16:15:13 +08:00
github-actions[bot]
3c9f359e60 [Backport release-1.5] Fix: the workflow records do not delete if the driver is MongoDB (#4722)
* Fix: the workflow records do not delete if the driver is MongoDB

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 284197ef09)

* Fix: change the unit test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 934c04b511)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-09-14 14:29:11 +08:00
github-actions[bot]
e5b0149ce5 Fix: fix uninstallation continues when answer is no (#4712)
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 81115ef6ff)

Co-authored-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-09-13 10:25:08 +08:00
github-actions[bot]
83fd9edcfe Feat: add nodeport in webservice (#4698)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 6579063fcf)

Co-authored-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-09-07 11:42:37 +08:00
github-actions[bot]
f986073273 [Backport release-1.5] Feat: request token when vela auth gen-kubeconfig (#4692)
* Feat: request token when vela auth gen-kubeconfig

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 34014c3643)

* 1.24 test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 6e961765be)

* fix test

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 4acc0ed64f)

* fix test

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit adfb0a2548)

* format

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 6f2b9538b6)

* more test on 1.24

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit d91ce9ea6a)

* rollback some logic and fix test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit ba9a25ab2e)

* fix

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 8fcb9f2ac2)

Co-authored-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-09-05 17:36:10 +08:00
github-actions[bot]
17872f9705 fix enable addon cannot update definition bug (#4686)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit b5cd806efa)

Co-authored-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-09-02 17:47:42 +08:00
qiaozp
e463dbf1fb Chore: Add v1.23 to regular CI test (#4673) (#4677)
* Chore: use higher k8s version in CI

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

* 1.23

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

* egress-selector-mode=disabled

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

* egress-selector-mode=disabled

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

* fix

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

* add hub args

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

* fix e2e test

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

* fix multicluster test

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

* fix multicluster test

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

* add all egress

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

* fix test

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

* version matrix

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

* cal egress arg

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

* fix

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

* fix

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

* regular v1.23 and restict concurency

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

* fix

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

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

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-09-01 19:10:18 +08:00
qiaozp
44142c4c70 Chore: Migrate to k3d in CI & trim redundant steps (#4652) (#4676)
Fix: flaky CI test (#4669)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-09-01 17:22:02 +08:00
github-actions[bot]
e460638799 Fix: unknown field cluster (#4674)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 77a22b0d72)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-31 17:45:36 +08:00
github-actions[bot]
58ca3a820d fix: add supported but missing provider (#4651)
Signed-off-by: Yuedong Wu <57584831+lunarwhite@users.noreply.github.com>
(cherry picked from commit fa96c917a8)

Co-authored-by: Yuedong Wu <57584831+lunarwhite@users.noreply.github.com>
2022-08-24 09:29:04 +08:00
Tianxin Dong
63b31be38e Fix: fix signedKey using platform id (#4654)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-08-24 09:28:07 +08:00
Tianxin Dong
06f10d4026 Fix: optimize workflow debug cmd (#4649)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-08-23 17:41:33 +08:00
Somefive
7a2b18b78a Fix: open basic lit fails lookup path to KubeVela 1.5 (#4625)
* Fix: open basic lit fails lookup path

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

* Fix: test

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

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-18 10:29:05 +08:00
github-actions[bot]
52ee87df16 [Backport release-1.5] Fix: up command example (#4627)
* Fix: up command example

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 3ab6e8d80c)

* typo

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 5e232b1caa)

Co-authored-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-08-17 13:50:23 +08:00
github-actions[bot]
3177d26fc4 Fix: skipGC remove labels for multi-cluster resource not use correct ctx (#4622)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit c59755b6a4)

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2022-08-15 11:09:32 +08:00
github-actions[bot]
3df1776b37 Fix: the create time of the synced policies is zero (#4610)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 29436e6d23)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-12 14:44:23 +08:00
github-actions[bot]
a6434c3efa Feat: align resource selector across policies (#4609)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit 989f599fab)

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2022-08-12 11:01:14 +08:00
github-actions[bot]
766594d625 Fix: remove the ui-hidden label and the grafana traits (#4608)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit d098e34a17)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-11 17:36:24 +08:00
github-actions[bot]
f7bd17edd7 [Backport release-1.5] Fix: try to fix addon flaky test (#4598)
* only for test

test

show info

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

try to fix e2e-test

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

try to fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit ba973b722c)

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit 1910d643c8)

Co-authored-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-08-10 21:08:17 +08:00
github-actions[bot]
5213e54466 Fix: fix writing logs to file (#4589)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
(cherry picked from commit d4b3bbf049)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-08-10 10:00:59 +08:00
github-actions[bot]
939556a698 Fix: addon dependency 1.1 legacy support (#4591)
Signed-off-by: Zhiyu Wang <cloudsky.newbis@gmail.com>
(cherry picked from commit 512a0563fa)

Co-authored-by: Zhiyu Wang <cloudsky.newbis@gmail.com>
2022-08-10 09:59:42 +08:00
github-actions[bot]
c8d89a1856 Fix: gc resources without resourceversion (#4586)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit bccae77a8c)

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2022-08-09 19:21:49 +08:00
github-actions[bot]
891429c5f5 Fix: add status code for cue struct (#4584)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit 6ae03228ac)

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2022-08-09 17:25:09 +08:00
github-actions[bot]
8b6dbd781f Feat: definition support controller requirement (#4579)
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>
(cherry picked from commit 714f218f90)

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2022-08-08 16:07:58 +08:00
github-actions[bot]
7916e874c5 Docs: add description for shared-resource (#4575)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit cec1f3e9c2)

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2022-08-08 12:05:09 +08:00
github-actions[bot]
8f78189a79 [Backport release-1.5] Fix: fix addon bond component annotaion (#4574)
* fix miss spell annotation

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit 5b3c5e35ff)

* add comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit 4497efb8c7)

* fix golint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit 0e9273521d)

Co-authored-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-08-08 11:58:11 +08:00
github-actions[bot]
6d979cfcab [Backport release-1.5] Fix: reject applications with empty policy properties (#4566)
* Fix: reject applications with empty policies

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 337032511e)

* Style: change err msg

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 2bb5c0245a)

* Fix: use 400 instead of 422 to show err msg

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 553ac92c62)

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 0ce352d13b)

Co-authored-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-08-05 15:05:00 +08:00
github-actions[bot]
491127daec [Backport release-1.5] Fix: vela CLI provider compatibility (#4564)
* Fix: vela CLI provider compatibility

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 2be007e9a0)

* fix

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit c053d831e7)

* List interface won't return NotFoundError

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit b7e9a738d0)

* format imports

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit f35cb3a77f)

Co-authored-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-08-05 14:41:22 +08:00
github-actions[bot]
1829cf4e40 Fix: compare resource without version (#4562)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit cea2e6034d)

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2022-08-04 17:32:49 +08:00
github-actions[bot]
b0facbeaab Feat: ignore control check for resource without resource version (#4557)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit 71554adbf1)

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2022-08-04 15:30:11 +08:00
github-actions[bot]
e29b1af202 Chore: fix cli description to remove html tag format (#4552)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
(cherry picked from commit d4d3b1c9dd)

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-08-03 20:15:32 +08:00
github-actions[bot]
a3ee8eb01d [Backport release-1.5] Fix: remove the cloudshell dockerfile (#4549)
* Fix: remove the cloudshell dockerfile

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 7839e130b8)

* Fix: change the configmap name

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit f4e390e5c4)

* Fix: change the way to get the namespace

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 20ce558efe)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-03 16:20:34 +08:00
github-actions[bot]
84b4d0f685 [Backport release-1.5] Feat: report the manifest name when addon enabling failed (#4547)
* Feat: Report the manifest name when Addon enabling failed

Signed-off-by: ghostloda <78798447@qq.com>
(cherry picked from commit d143c341af)

* Apply suggestions from code review

Co-authored-by: Jianbo Sun <wonderflow@icloud.com>
Signed-off-by: ghostloda <78798447@qq.com>
(cherry picked from commit a5ba4658a9)

* Apply suggestions from code review

Co-authored-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: ghostloda <78798447@qq.com>
(cherry picked from commit 67f34ac4a6)

Co-authored-by: ghostloda <78798447@qq.com>
2022-08-03 13:52:25 +08:00
github-actions[bot]
4e370b940c Fix: sidecar trait (#4543)
Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 3eaf2dd02a)

Co-authored-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-08-02 23:10:12 +08:00
github-actions[bot]
110156aff0 Fix: upgrade the cloudshell image (#4540)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 922b9b10ef)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-02 22:21:57 +08:00
github-actions[bot]
62df98818e [Backport release-1.5] Feat: Check def binding to a component (#4539)
* finish logic

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit aae7af45cb)

* finish tests

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

small fix

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

fix ci

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit 0418ad5207)

* fix comments

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

fix ci

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit 7469b0497e)

* fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit 49749d7c17)

* fix tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit 5b029147c1)

Co-authored-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-08-02 21:37:53 +08:00
github-actions[bot]
992e636211 Feat: support change resource gc policy from onAppUpdate to Never (#4537)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit 55c9f6049f)

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2022-08-02 20:21:42 +08:00
github-actions[bot]
3a7a8ac59f Fix: publish chart version (#4536)
Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 53ebebba78)

Co-authored-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-08-02 20:20:56 +08:00
github-actions[bot]
75fd38f1de [Backport release-1.5] Chore: update chart-publishing, only push index and new charts (#4534)
* Chore: update chart-publishing, only push index and new charts

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 121c37bcee)

* fix

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 8416b67dff)

Co-authored-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-08-02 19:29:40 +08:00
github-actions[bot]
8abd78e5f1 [Backport release-1.5] Fix: storage patch env (#4533)
* Fix: empty health policy do not check object existence

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit 720ab3f6a8)

* Fix: fix health check error

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit ffb6d64a87)

* Fix: app use storage and env trait

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit 6fbc17af09)

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2022-08-02 19:19:23 +08:00
github-actions[bot]
2d82e74c5b [Backport release-1.5] Feat: add the daemonset resource rule for building the tree (#4532)
* Feat: add the daemonset resource policy for building the tree

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit e8653d4ace)

* Fix: the import package

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 7594a83620)

* Fix: the unit test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 6058d797ea)

* Fix: change some function and variable names

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 29f5468d32)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-02 19:15:53 +08:00
github-actions[bot]
66dfcec0ad [Backport release-1.5] Feat: add http status and code from http cmd run (#4528)
* Feat: add http status and code from http cmd run

Signed-off-by: suxiang <704427617@qq.com>
(cherry picked from commit 0b96b2e60a)

* Feat: fix unit test error

Signed-off-by: suxiang <704427617@qq.com>
(cherry picked from commit 25f2291503)

* Feat: status is not necessary

Signed-off-by: suxiang <704427617@qq.com>
(cherry picked from commit ef3b8ac82b)

* Feat: make reviewable

Signed-off-by: suxiang <704427617@qq.com>
(cherry picked from commit 684f5e9ae2)

* Feat: add unit test

Signed-off-by: suxiang <704427617@qq.com>
(cherry picked from commit 6c39f602ea)

* Feat: make reviewable

Signed-off-by: suxiang <704427617@qq.com>
(cherry picked from commit 20ae7f2e15)

Co-authored-by: suxiang <704427617@qq.com>
2022-08-02 16:18:47 +08:00
github-actions[bot]
37dd176dd3 [Backport release-1.5] Fix: fix e2e flaky tests (#4524)
* try to show

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

test

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

fix e2e tests

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

add mock server back

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

fix flaky tests

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

fix tests

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

fix e2e-test

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

only for tests

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

fix

(cherry picked from commit ba5cc24d54)

* only for tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit 6872f77eaa)

Co-authored-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-08-02 15:18:34 +08:00
Zhiyu Wang
da9bd8ca63 Fix: missing return when token is null (#4520)
Signed-off-by: Zhiyu Wang <cloudsky.newbis@gmail.com>
(cherry picked from commit d810d9d042)
2022-08-02 11:02:02 +08:00
github-actions[bot]
bc1d24e034 [Backport release-1.5] Fix: empty health policy do not check object existence (#4522)
* Fix: empty health policy do not check object existence

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit c759603094)

* Fix: fix health check error

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit d46e49f9ef)

* Fix: add test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit c29ded0765)

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2022-08-02 11:00:57 +08:00
github-actions[bot]
bcce87c073 Fix: can not find the resource when the resource namespace is diffrent with application (#4518)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 56b440677d)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-01 22:43:28 +08:00
github-actions[bot]
3a9e5ccd5d [Backport release-1.5] Feat: refactor CLI commands related to resources (#4514)
* Feat: refactor CLI commands related to resources

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit dacefcac80)

* Fix: remove the old test case.

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit ef9fbaa22f)

* Fix: e2e test

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 6f412f5b45)

* Fix: optimize test cases

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 501d7cfad7)

* Feat: rename 'vela pods' to 'vela status --pod'

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 2d6ad41afc)

* Feat: optimize the e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit afa786a096)

* Fix: sort the objects

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 619e9b1b5f)

* Fix: optimize the e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit d6688c40b5)

* Fix: list the pod by the labels

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit aec1791ac1)

* Fix: order the tree resource

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit f51abadec3)

* Fix: set multicluster config

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 767b0020e5)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-01 19:46:20 +08:00
github-actions[bot]
1b21db979f Fix: there is no color in the diff report (#4513)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 7ab3d58d8a)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-01 18:27:56 +08:00
github-actions[bot]
618596b98e [Backport release-1.5] Feat: support set labels for env (#4506)
* Feat: support set labels for env

Signed-off-by: codinghuang <codinghuang@qq.com>
(cherry picked from commit 25558c1f18)

* Refactor: Remove util.ParseLabelString

use k8s.io/apimachinery/pkg/labels

Signed-off-by: codinghuang <codinghuang@qq.com>
(cherry picked from commit abf756fb14)

Co-authored-by: codinghuang <codinghuang@qq.com>
2022-07-29 19:18:32 +08:00
github-actions[bot]
db21d74a52 [Backport release-1.5] Fix: failed to assign the default role for the users who log in from dex (#4504)
* Fix: failed to assign the default role for the users who log in from dex

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit ad501b4582)

* Fix: cluster e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 23cd84ba94)

* Fix: the ensure namespace error is ignored

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 8beb1c6925)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-29 17:19:21 +08:00
github-actions[bot]
fafa18e8db [Backport release-1.5] Fix: check definition of addon whether is conflict (#4502)
* fix checksemver

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

override defs

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

add tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit 226b4d390f)

* add test and fix some special cases

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

fix checkdiff

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

fix flags

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit 910d411e99)

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit fefca7d9e2)

* small fix

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit 04c5ec8a7e)

Co-authored-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-29 16:47:43 +08:00
github-actions[bot]
acf923dd10 [Backport release-1.5] Fix: CloudShell read-only authorization is not automatically revoked (#4503)
* Fix: CloudShell read-only authorization is not automatically revoked

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 9e91330531)

* Fix: code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit bb64b33815)

* Fix: rename the prefix

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 79bd974d4c)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-29 16:47:17 +08:00
github-actions[bot]
8fc94f057f [Backport release-1.5] Feat: System Info & Diagnose (#4499)
* Feat: System Info & Diagnose

Signed-off-by: foursevenlove <foursevenlove@gmail.com>
(cherry picked from commit 96e303f2e6)

* Fix:1.misspelling 2.license

Signed-off-by: foursevenlove <foursevenlove@gmail.com>
(cherry picked from commit 3f9d8dfa8f)

* Fix: pattern of imported package

Signed-off-by: foursevenlove <foursevenlove@gmail.com>
(cherry picked from commit 6584564a89)

* Fix: pattern of imported package

Signed-off-by: foursevenlove <foursevenlove@gmail.com>
(cherry picked from commit b500f41cc6)

* 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.

(cherry picked from commit 548a3accef)

* Feat: 1.the system info command displays the environment variables

(cherry picked from commit 9ba993d71a)

* Fix: Making syntax simple

(cherry picked from commit 558812d64d)

Co-authored-by: foursevenlove <foursevenlove@gmail.com>
2022-07-29 14:28:01 +08:00
github-actions[bot]
6a6dfba79b [Backport release-1.5] Chore: organize appliesToWorkloads field of trait defs, add doc example (#4497)
* Chore: organize appliesToWorkloads field of trait defs, add doc example

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit ad829d986a)

* fix gen

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 3ad81e2d2b)

* add deprecate label

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit f22dea4256)

* fix

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 46c6c3f57a)

* fix script to read all definition in directory

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit bf52fe7fca)

* add comment

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit d72e64928c)

* go.mod

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 28b726c5b0)

* update some usage, better trait doc gen

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 99ea162c96)

* minor fix

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 6b7fe15c1f)

* minor fix

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit 2bdd1e7461)

* postpone markdown escape pipe char

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit c15c8cf0e1)

Co-authored-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-07-29 11:23:35 +08:00
github-actions[bot]
3b7a997b3e Fix: repeat query configuration type (#4494)
Signed-off-by: ghostloda <78798447@qq.com>
(cherry picked from commit 5c048b3ee3)

Co-authored-by: ghostloda <78798447@qq.com>
2022-07-28 14:27:36 +08:00
github-actions[bot]
e13a259bca Feat: delete multi apps from vela delete cli command (#4486)
Signed-off-by: suxiang <704427617@qq.com>
(cherry picked from commit 957da65449)

Co-authored-by: suxiang <704427617@qq.com>
2022-07-27 18:59:10 +08:00
Somefive
58af7103e7 Fix: address vela-core crash due to empty policy properties (#4473) (#4479)
* Fix: fix topology core crash

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Fix: same problem in other places

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: remove empty line

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: raise error when empty topology is used

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: raise error when empty override policy is used

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

Co-authored-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-27 13:15:39 +08:00
github-actions[bot]
b329923f81 Fix: fix logs to record the right publish version (#4477)
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>
(cherry picked from commit 4846104c8f)

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2022-07-27 01:12:40 +08:00
github-actions[bot]
6f8cc0f5b4 [Backport release-1.5] Feat: show warnings about internal addon rendering logic (#4478)
* Feat: show warnings about addon rendering logic

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit d466897e5a)

* Feat: update vela init to not show warnings

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit b438114311)

* Refactor: use setter

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit a3b501d29e)

* fix check-diff

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 3c0e72e1ad)

Co-authored-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-26 23:37:56 +08:00
github-actions[bot]
8c9d0ae314 Chore: refactor addon enable with package (#4468)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
(cherry picked from commit 702fa36621)

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-26 15:23:33 +08:00
Somefive
b6c024c205 Feat: add featuregates to disallow url in ref-objects (#4466)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-26 13:37:11 +08:00
github-actions[bot]
3ab0b503c5 Fix: docker file fail to build for vela cli (#4465)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
(cherry picked from commit 62fcb152e2)

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-25 22:45:13 +08:00
github-actions[bot]
85e168fea7 Fix: The apply failure error is ignored when the workflow is executed (#4462)
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>
(cherry picked from commit b1d8e6c88b)

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2022-07-25 22:18:53 +08:00
github-actions[bot]
189d74e87b Feat: delete svc flag from vela delete cli cmd (#4463)
Signed-off-by: suxiang <704427617@qq.com>
(cherry picked from commit 8d1a87083d)

Co-authored-by: suxiang <704427617@qq.com>
2022-07-25 22:18:29 +08:00
github-actions[bot]
8ec0209026 Feat: support vela addon enable with package (#4458)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
(cherry picked from commit 863d6161b1)

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-25 22:16:50 +08:00
github-actions[bot]
c3a7209fa7 [Backport release-1.5] Feat: make addon init use the latest CUE addon template (#4456)
* Feat: make addon init use the latest CUE addon template

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 0e95fb4f4f)

* Refactor: simplify init cmd

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 0bd68c47b2)

* Feat: ignore metadata

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit d475a000ab)

* Feat: remove status

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 5e26c18dce)

* do not marshal to application

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit b80cbf811f)

* Feat: only look for output field

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit cb74abad3b)

* Feat: use global constant

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit b93bebc359)

* Test: update tests according to changes

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit f933043148)

Co-authored-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-25 21:34:22 +08:00
github-actions[bot]
564cba9aac [Backport release-1.5] Feat: support outputs for addon (#4457)
* support outputs for addon

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit 123b6b5648)

* fix comments

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

fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit 56132504f7)

Co-authored-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-25 21:34:04 +08:00
github-actions[bot]
f7c21df915 [Backport release-1.5] Feat: support to query the alias of the project member (#4454)
* Feat: support to query the alias of the project member

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 1cc82e324a)

* Fix: optimize the e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit a45be41240)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-25 21:30:46 +08:00
github-actions[bot]
0b9c7f66c0 Feat: adapt vela port-forward with the velaql (#4453)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
(cherry picked from commit 50f902e483)

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-25 21:29:00 +08:00
github-actions[bot]
54867c50d8 Fix: the history applications are repeatedly synchronized (#4452)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit de80fbcf40)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-25 21:26:59 +08:00
github-actions[bot]
16d7a4b4f4 Revert "Chore: upgrade kind in tests, fix flaky test (#4105)" (#4451)
This reverts commit 8aaf526877.

(cherry picked from commit 3f9529dd34)

Co-authored-by: Jianbo Sun <wonderflow@icloud.com>
2022-07-25 19:09:12 +08:00
github-actions[bot]
35ae4e5ef5 [Backport release-1.5] Fix: address failure when rendering addon API schemas (#4445)
* Fix: address failure when rendering addon API schemas

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit de7a64346c)

* Fix: address failure when rendering addon API schemas

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 284e673bad)

* Test: add tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 1c0653e449)

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 78104068b1)

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
(cherry picked from commit 0442f823c8)

Co-authored-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-25 17:02:32 +08:00
github-actions[bot]
853f44cf61 [Backport release-1.5] Fix: support to test authentication with dex (#4440)
* Fix: support to test login with dex

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 8d0d20fd60)

* Fix: support to update the user when the login mode is dex

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 442d4601e9)

* Fix: systemInfoService is nil

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 392637e69d)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-25 15:53:22 +08:00
github-actions[bot]
ca2a90a097 [Backport release-1.5] Feat: support to init the roles of the user who login by dex (#4436)
* Feat: support to init the roles of the user which login by dex

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 9a255cdbc8)

* Fix: add the comment

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 538bf2a08b)

* Fix: make the sub string to lower

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
(cherry picked from commit 01160614e8)

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-25 11:14:06 +08:00
github-actions[bot]
d110e97d68 [Backport release-1.5] Chore: update description of policy/workflowstep definition (#4435)
* Chore: update description of policy definition

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
(cherry picked from commit 679ee6d8cd)

* Fix: support workflow step generation for doc

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
(cherry picked from commit 418cd20315)

* Chore: refactor package refereces/plugins to references/docgen

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
(cherry picked from commit 346c3b8f2b)

* Chore: add examples of def docs for workflow step

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
(cherry picked from commit ea5d9b9076)

* Feat: refine workflow description

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
(cherry picked from commit bdfc66c65e)

* Chore: refine the workflow step definition

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
(cherry picked from commit 249af896b3)

* Chore: update workflow step definition

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
(cherry picked from commit 3aa5569dd5)

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-25 10:48:00 +08:00
github-actions[bot]
741559c8e0 Feat: support vela def apply for directory (#4432)
Co-authored-by: ivyilike <pww123@cmbchina.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
(cherry picked from commit b62ebb05d4)

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-24 16:37:04 +08:00
wyike
25b0cb8ee1 Feat: Addon support app template written by cuelang. (#4401)
* pass tests

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

refactor some codes

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

WIP delete useless workflow

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

add checklegacy addon

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

refactor some logics

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

fix panic test

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

delete useless addon test

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

fix empty clusterargs

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

fix comments

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

* rewrite some logic to support parameter ui

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

* rename template cue

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

fix panic test

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

add tests

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

fix render tests

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

fix checkdiff

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

* add tests

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

fix

add more tests

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

add tests

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

* update file header

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

* fix comments

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

fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-22 17:58:19 +08:00
barnettZQG
96ece000dc Feat: support to sync the revision and the workflow status (#4419)
* 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>
2022-07-22 16:14:38 +08:00
StevenLeiZhang
67f3f2747a Fix: vela addon upgrade missing the history args (#4388)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-07-22 14:39:09 +08:00
Charlie Chiang
5890b58aea Feat: get raw Application yaml, json or jsonpath (#4415)
* Feat: get raw Application

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Fix: add gvk

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: git rid of managedFields

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: fix typos

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add test and make changes according to comments

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: more help text

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format imports

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-22 14:36:50 +08:00
barnettZQG
68967f7af8 Fix: the env name is empty (#4412)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-22 10:37:04 +08:00
Jianbo Sun
68a9565a1f Chore: trim debug info (#4423)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-22 10:36:38 +08:00
qiaozp
8aaf526877 Chore: upgrade kind in tests, fix flaky test (#4105)
* Chore: upgrade kind in tests, fix some hacky test.

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* longer wait

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* make e2e-multicluster test timeout 20m

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* switch to kind v0.14.0

Signed-off-by: 伊灵 <qiaozhongpei.qzp@alibaba-inc.com>
2022-07-22 10:09:31 +08:00
Jianbo Sun
957302cb9d Feat: support vela kube apply for CUE and JSON files (#4420)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-21 16:02:57 +08:00
ZhongsJie
285a5cce18 Fix: ignore save when source is local-path (#4417)
Signed-off-by: ZhongsJie <zhongsjie@gmail.com>
2022-07-21 14:30:49 +08:00
ZhongsJie
d386b64ea2 Feat: provide defualt namespace for dry-run (#4416)
Signed-off-by: ZhongsJie <zhongsjie@gmail.com>
2022-07-21 10:04:20 +08:00
Tianxin Dong
181bc926f6 Fix: fix backoff time after default backoff times (#4413)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-07-20 15:45:23 +08:00
barnettZQG
ab6c1a57eb Fix: the empty SectionName causes panic (#4408)
* Fix: the empty SectionName causes panic

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

* Fix: unit test bug

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-19 22:05:56 +08:00
TIEDPAG
e37b0276c8 Feat: support addon helm repo skip tls verify (#4122) (#4146)
* Feat: support addon helm repo skip tls verify (#4122)

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Fix: mv http server to BeforeSuite

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Fix: fix ci error

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Fix: fix merge

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Feat: support addon helm repo skip tls verify (#4122)

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Fix: mv http server to BeforeSuite

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Fix: fix ci error

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Fix: fix ci

Signed-off-by: damianqin <damianqin@tiedpag.club>

Co-authored-by: damianqin <damianqin@tiedpag.club>
Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-19 18:00:28 +08:00
Somefive
fd784e291c Feat: add several policy definition (#4409)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-19 15:47:01 +08:00
Tianxin Dong
16dfc1bf8a Feat: add pending phase in workflow step (#4365)
* Feat: add pending phase in workflow step

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-07-19 14:31:20 +08:00
barnettZQG
f876a0b8f8 Fix: only compare with the default environment (#4402)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-19 11:01:33 +08:00
wyike
60129e0f94 Fix: fetch workflowpolicy policy info when request detail policy info (#4403)
* fix several bugs

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

* fix commentes

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

move test back

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-19 10:29:41 +08:00
Somefive
e747eae779 Fix: prevent apply existing orphan resource (#4399)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-18 19:23:41 +08:00
Jianbo Sun
b24e7523d8 Feat: generate docs for reference automatically (#4377)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Feat: refactor hardcode example to embd.FS

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: refactor doc gen for general types

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: update generate format

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: generate terraform reference docs

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Feat: add definition reference generate script

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: refine output format

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: remove dup annotation

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: update doc

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: add i18n support

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Feat: add translation

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Feat: add policy definition gen

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: add compatibility for lable Annotation change

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: add more tests

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Feat: allow mark example doc url on annotation

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: align vela show with vela def doc-gen, add vela def show equals with vela show

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-18 19:22:55 +08:00
barnettZQG
a519a6c89d Feat: optimize the dry run feature (#4364)
* Feat: optimize the dry run feature

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

* Fix: e2e test case

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

* Fix: change the bcode

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

* Fix: change some names

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-18 14:01:11 +08:00
Charlie Chiang
ace23f1c6f Feat: enhance addon init (#4370)
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-18 10:40:42 +08:00
Zheng Xi Zhou
557f7197b5 Fix: examples on how to use cloud resources (#3385)
Added RDS and OSS examples to show to use cloud resources

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-07-18 10:18:42 +08:00
Jianbo Sun
01737d62b0 Chore: split unit test from e2e test for apiserver and use skip-dup v4 (#4369)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-16 17:34:52 +08:00
barnettZQG
945852284f Fix: read the ca cert from the test env (#4391)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-15 22:09:13 +08:00
Tianxin Dong
eed081fd6f Fix: fix volumes duplicate in list (#4387)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-07-15 20:09:44 +08:00
wyike
203a7dfbda add two fileds (#4383)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-15 16:00:59 +08:00
Somefive
cba8cb4c94 Fix: add usage comment for ref-objects (#4384)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-14 18:49:54 +08:00
barnettZQG
1fc65f56bf Feat: support HTTPRoute to generate endpoint (#4378)
* Feat: support HTTPRoute to generate endpoint

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

* Feat: print the inner in CLI

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

* Fix: change the comment

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-14 18:15:20 +08:00
wyike
c29e980e8a Fix: fail directly when app terminated (#4363)
* fail directly when app terminated

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

* support suspend

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

fix typo

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-14 18:14:09 +08:00
barnettZQG
e52ae78bd7 Fix: the project manager no permission to query the project base info (#4380)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-14 11:54:58 +08:00
wyike
930d866e09 Feat: velaux support override policy (#4352)
* velaux support override policy

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

add comments

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

* in the middle of add test

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

fix

in the middle of work

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

add test

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

* add comments

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

reverse flacky test

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

fix goling

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

* add test for syspend step

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-14 11:52:49 +08:00
Somefive
3159da0bb3 Fix: several minor bugs (#4367)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-14 10:51:22 +08:00
Jianbo Sun
8571aa76ef Fix: abuse timeout context in terraform provider (#4374)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-13 15:47:15 +08:00
Jianbo Sun
072b80f6c6 Feat: support vela def apply for yaml definition (#4372)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-13 15:31:30 +08:00
Jianbo Sun
cde76989a0 Feat: support resource topology for endpoints (#4362)
* Feat: support resource topology for endpoints

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: add and refactor the test for endpoint

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-13 14:51:06 +08:00
Somefive
3b3898bf71 Feat: add status check for expose trait (#4356)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-12 13:24:56 +08:00
barnettZQG
c43575a63c Fix: add the job of independently publishing chart packages (#4360)
* Fix: add the job of independently publishing chart packages

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

* Fix: add the job of independently publishing chart packages

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-12 12:23:28 +08:00
huiwq1990
b0020b0600 cleanup cluster exist check (#4357)
Signed-off-by: huiwq1990 <huiwq1990@163.com>
2022-07-12 11:11:06 +08:00
Tianxin Dong
a8d5403fee Feat: optimize imports packages to reduce 75% cpu with better performance (#4345)
* Feat: optimize imports packages

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-07-11 17:32:18 +08:00
Jianbo Sun
649aaa29a4 Chore: upgrade cloud.google.com/go/compute to 1.7.0 (#4350)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-11 17:29:23 +08:00
Somefive
40c76071a8 Fix: init container bug (#4351)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-11 17:02:03 +08:00
Jianbo Sun
4bd4e9014f Feat: support read from URL for --file command globally (#4346)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-11 16:59:54 +08:00
Somefive
0cb85d897a Fix: health check use original ns if no override and original exists (#4349)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-11 16:46:14 +08:00
Somefive
2cfedf7439 Fix: escape resource name for label selector (#4348)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-11 15:26:14 +08:00
Somefive
b9b6c5f8bf Fix: ignore empty output file (#4347)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-11 14:59:32 +08:00
Somefive
ec094f2e36 Fix: enhance sidecar & init traits (#4341)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-08 19:08:38 +08:00
barnettZQG
b7bf9df55f Feat: supports multiple difference compare modes (#4334)
* Feat: supports multiple difference alignment modes

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

* Fix: change field name

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-08 09:38:18 +08:00
Somefive
201f68c6cd Feat: add daemon component def (#4335)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-07 19:48:52 +08:00
Somefive
cae7b327f8 Feat: reuse informer for app metrics (#4336)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-07 16:46:35 +08:00
Somefive
fd70aa96e9 Fix: disable apprev status update when apprev disabled (#4337)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-07 15:32:46 +08:00
Charlie Chiang
3a6d947f07 Feat: create VelaQL views using vela ql apply (#4324)
* Feat: create VelaQL views using `vela ql create`

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format imports

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: merge reusable function

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format import

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: make changes according to comments

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for `status` or `export` fields

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: make changes according to comments

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: rename variables

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-07 13:59:16 +08:00
wyike
5de790413f Feat: support self-signed helm repo (#4322)
* support self-signed helmrepo

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

fix golint

fix golint error

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

* add certkey and certfile

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-07 12:21:59 +08:00
barnettZQG
09acc8a989 Fix: the target conflict when syncing the application (#4312)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-06 17:54:16 +08:00
Jianbo Sun
37605a1a8d Fix: filter last applied config for CRD, fixes #3679 (#4331)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-06 17:42:54 +08:00
Jianbo Sun
e0ab16851e Chore: refine the output of velaux addon fixes #3902 (#4332)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-06 17:42:20 +08:00
wyike
4ed3171b8e Fix: more cluster system info range. (#4329)
* more collect info

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

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-06 16:13:33 +08:00
huiwq1990
a3ab08741e end logic not use (#4325)
Signed-off-by: huiwq1990 <huiwq1990@163.com>
2022-07-06 15:46:10 +08:00
huiwq1990
c97124a30f Feat: add policy parser test (#4174)
Signed-off-by: huiwq1990 <huiwq1990@163.com>
2022-07-06 15:42:06 +08:00
Charlie Chiang
da5282a15d Feat: show or list revisions in vela def get and vela show (#4307)
* Feat: support --version when getting definitions

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for vela show

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format imports

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-06 15:41:00 +08:00
Charlie Chiang
be317c412a Feat: print complex values in addon parameters (#4309)
* Feat: support nested parameters in addon parameters

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: show all params

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: handle any addon parameters

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: add a error check on json marshell

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-06 15:39:46 +08:00
Sumit Tembe
a422ae8ab4 Feat: don't ask user confirmation when delete with --force or --yes (#4259)
* 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
2022-07-06 15:34:41 +08:00
Somefive
4509b974ad Feat: enhance deploy workflow step generator (#4315)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-06 14:31:46 +08:00
jiangshantao
d85f95fa19 Fix: ref-objects parameter with invalid field definition (#4319)
* 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>
2022-07-06 14:09:00 +08:00
barnettZQG
0e71a9d044 Feat: set the cloudshell instance max live time (#4313)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-05 10:58:00 +08:00
Jianbo Sun
eea8570e10 Feat: add the CloudShell feature (#4280)
* Feat: add the CloudShell feature

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

* Fix: unit test bug

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

* Feat: handle the error

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

* Feat: change the auth package

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

* Fix: change the CSR name

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

* Fix: change the generate function

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

* Fix: unit test

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

* Fix: e2e test

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-01 23:31:15 +08:00
barnettZQG
2af8ab13d6 Fix: fail to query the application logs with the special characters (#4305)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-01 20:14:05 +08:00
Jianbo Sun
9042bb29d5 Fix: Jfrog Webhook Handler Cannot Get Right Image (#4301)
Merge branch 'release-1.4'

Apply suggestions from code review

Co-authored-by: lqs429521992 <lqs429521992@qq.com>

Update webhook.go

Fix: format

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Co-authored-by: qingsliu <lqs429521992@qq.com>
2022-07-01 20:04:50 +08:00
Tianxin Dong
c6d170fef6 Fix: fix the goroutine leak in http request (#4298)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-07-01 17:52:54 +08:00
Somefive
8f11b5b1a4 Fix: kube apply ignore userinfo for rt (#4297)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-01 17:30:55 +08:00
wyike
7df0f20f70 support only provide vela or kubernetes version requirement (#4284)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix

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

helm package logic

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

delete useless code

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-01 17:06:22 +08:00
Somefive
51a60593cf Fix: context.namespace use override namespace when rendering component and trait (#4291)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-01 15:28:25 +08:00
Charlie Chiang
b2dfee134b Feat: print addon parameters recursively (#4290)
* Feat: support nested parameters in addon parameters

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: show all params

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-06-30 23:38:38 +08:00
huiwq1990
68d2d84880 addon use cluster sdk to check deploy (#4282)
Signed-off-by: huiwq1990 <huiwq1990@163.com>
2022-06-30 19:10:32 +08:00
Somefive
de37545a12 Feat: disable component revision for component wo rollout (#4281)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-30 16:22:46 +08:00
qiaozp
7a87e6e632 Chore: avoid update version file when publish smaller version (#4272)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-06-30 15:50:04 +08:00
Somefive
0469ba494e Fix: controller use cluster client to support empty label selector selecting local cluster (#4275)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-29 19:04:28 +08:00
Siege Lion
cdafc03e7d Feat: search useful addon version automatically (#4232)
* 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>
2022-06-29 17:46:56 +08:00
Jianbo Sun
0ece1d4400 Chore: update readme (#4279)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-29 16:22:55 +08:00
Somefive
ffb0d2fa87 Feat: enhance ServiceAccount trait to support privileges (#4276)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-29 14:59:06 +08:00
Jianbo Sun
71df27a8c3 Fix: support stdin and url for vela ql (#4274)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-29 14:50:24 +08:00
Charlie Chiang
370940070b Feat: filter definitions by which addon installed them (#4156)
* Feat: filter by source addon in `vela def list`

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: change header year to 2022

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: use generic filters for extensibility

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: change variable addonFilter to addonName

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: update tests according to code changes

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: unify SearchDefinition params using filters

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: simplify tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: remove redundant code

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests with multiple filters

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: show SOURCE-ADDON column in `def list`, if any

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: add addon filter to apiserver definition-lists

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: fix lint issues

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Chore: update swagger doc accordingly

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for filter Applying

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: add a helper function to apply filters to lists

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format imports

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: add OwnerAddon to DefinitionBase

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for OwnerAddon field

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add addon util tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-06-29 10:55:50 +08:00
Charlie Chiang
d3454ec9d5 Feat: implement addon push command (#4261)
* Feat: implement addon push command

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: split functions

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: add command usages

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for addon push command

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Chore: fix lint

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix old incomplete tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: also add test in pkg/addon

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: sort import

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: add break in for loop and remove default repo checks

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format imports

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: add a cli option to keep original Chart.yaml

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: add more help text

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: fix typo in comments

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: add more help text

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-06-28 20:16:45 +08:00
Tianxin Dong
4ecb26e8a2 Feat: store outputs for unsuccessful steps in workflow context (#4270)
* Feat: store outputs for unsuccessful steps in workflow context

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix the test of velaql

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-06-28 18:49:17 +08:00
Jianbo Sun
0e98959d61 Fix: trim quot char for velaql output (#4267)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-27 16:48:31 +08:00
Jianbo Sun
8b441b6579 Fix: provider can't be added since 1.4 as context abused && Feat: add cache for remote terraform module in vela show (#4256)
* 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>
2022-06-27 11:31:06 +08:00
Tianxin Dong
82fc74840d Fix: fix the dash case in if validate for inputs (#4253)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-06-27 11:28:00 +08:00
Sumit Tembe
5b9fb49a91 Feat: omit service output if there's nothing (#4260)
Signed-off-by: Sumit Tembe <sumit.tembe@outlook.com>
2022-06-27 10:18:43 +08:00
Carmen de Lope Contreras
15a56408fc environment from configmap or secret not mandatory in task and crontask componentdefinition (#4252)
Signed-off-by: Carmendelope <carmen@napptive.com>
2022-06-25 08:56:07 +08:00
Somefive
92fa67cd69 Feat: support url in ref-objects (#4240)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-24 19:34:51 +08:00
wyike
c4e1f39d28 Feat: Support kruise rollout (#4243)
* Feat: support kruise rollout

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

resolve roll back

fix

add tests

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

small fix

* fix rollback

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

topology filter by owner reference

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

fix ci

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

add comments

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

fix imports

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

fix lint

* rollback related tests

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

rename the operator

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

fix bugs

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

fix test

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

fix test

* clean args before start

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

fix test

* remove replace go mod

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

* fix operation tests

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

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2022-06-24 18:03:04 +08:00
StevenLeiZhang
dc660fc97d Fix: vela status print wrong STATUS (#4239)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-06-24 17:00:38 +08:00
Charlie Chiang
f8833e34bc Feat: implement addon init command (#4162)
* Feat: implement addon create command

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: make global vars local

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: fix typos

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: create test for file utils

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: use -p flag to manually specify paths

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: make changes according to comments

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: create empty scaffold if Chart-related paramaters are not provided

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: fix golangci-lint warnings

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add cli tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: show URL in errors if an invalid URL is detected

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-06-24 14:25:36 +08:00
Somefive
198fcfcc73 Feat: add metrics for workflow and app phase (#4236)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-24 14:15:02 +08:00
wyike
22fe52b19c Feat: skip validating version check (#4231)
* skip validating version check

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

* add comments

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

* fix comments

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

* fix test

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

* fix commments

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

* add compatible logic for old controller

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

* modify minimal

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-06-24 14:11:57 +08:00
Somefive
9c7d3f408d Feat: support shared resource (#4213)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-24 10:56:27 +08:00
Zheng Xi Zhou
4c90e90fff Fix: fixed the problems of display definition in web and support displaying WorkflowStep and Policy (#4234)
* 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>
2022-06-23 19:45:49 +08:00
Tianxin Dong
e10928d96f Feat: add mode and meta in workflow (#4206)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-06-23 10:55:34 +08:00
Tianxin Dong
72ac218982 Feat: add timeout and if examples (#4226)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-06-23 10:30:24 +08:00
Somefive
85173a7597 Fix: json-patch & json-merge-patch open result (#4225)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-22 19:55:58 +08:00
Tianxin Dong
f7be1cd2fc Feat: support more expressions in if and op.Fail (#4151)
* Feat: support more expressions in if

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix cache overrides context

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix skip status

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add tests in tasks

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add fail action

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix annotation in tests

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add failed reason in substeps

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix look up nil value

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add tests in workflow

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add tests in application controller

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* optimize the code

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add status in if

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix dash case

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-06-22 14:51:23 +08:00
barnettZQG
cf296b757c Chore: change the acr registry address (#4214)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-22 13:48:33 +08:00
barnettZQG
2ec18bd52e Feat: add the API for querying the image info (#4209)
* 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>
2022-06-21 15:03:55 +08:00
Somefive
73be281273 Fix: cue patch remove temp var (#4207)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-20 17:36:28 +08:00
Jianbo Sun
71a02b434b Feat: support dry run for policy (#4201)
* Feat: support dry run for policy

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: upgrade runc package

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-20 16:15:06 +08:00
barnettZQG
2ac3a7562d Feat: support to manage the CLI-created apps in VelaUX (#4197)
* Feat: support for automatically hosting CLI-created apps

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

* Fix: add the comment

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

* Fix: unit test bug

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

* Fix: unit test bug

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

* Fix: e2e error

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-20 16:06:48 +08:00
Charlie Chiang
e81d8ddacb Fix: skip endpoint table if no endpoints are found in addons (#4166)
* Feat: skip endpoint table if no endpoints are found in addons

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: rename function name

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: update tests to also exclude endpoints

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: reduce code changes

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-06-20 10:37:40 +08:00
Zhiyu Wang
e572235434 Feat: cli def alias support (#4185)
Signed-off-by: Zhiyu Wang <zhiyuwang.newbis@gmail.com>
2022-06-18 10:34:44 +08:00
Jianbo Sun
f157515251 Feat: enhance velq ql and support cue file (#4196)
* Feat: enhance velq ql and support cue file

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* add statement

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-17 13:44:09 +08:00
Somefive
6ed041c590 Fix: clear namespace for cluster scoped resource for dispatching (#4193)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-16 14:29:08 +08:00
Zheng Xi Zhou
195c4267c6 Fix: fix the annotation for APIService (#4187)
Make the annatation for cert-manger be the same as the new version
secret

Signed-off-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>

Co-authored-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>
2022-06-16 11:01:18 +08:00
wyike
d2fca08acb Feat: cli addon add registry add more git types (#4170)
* add more git types

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

* fix comments

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

fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-06-16 10:54:23 +08:00
maoyangLiu
dc0c194833 fix typo mistake (#4186) 2022-06-15 19:05:08 +08:00
Somefive
27ec48b617 Fix: enhance CLI for managing OCM clusters (#4165)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-15 11:18:59 +08:00
Xiangbo Ma
9d414ce123 Fix: fix trait customStatus error when controlPlanOnly=true (#4167)
Signed-off-by: fourierr <maxiangboo@qq.com>
2022-06-15 11:18:26 +08:00
Siege Lion
a9210487fa Fix: add handle of ".yml" type in readviewfile function (#4172)
handle of files of type ".yml" is ignored in the original function

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-06-15 00:29:16 +08:00
Siege Lion
0c190ef329 Feat: add the feature that views in addon are applied independently.(#3905) (#4154)
* 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>
2022-06-13 20:07:20 +08:00
Tianxin Dong
87673093e9 Feat: add timeout in workflow step (#4121)
* Feat: add timeout in workflow step

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: implement timeout in steps

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* support backoff time for timeout

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix tests

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix resume workflow cli

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* set suspend to false when terminate the workflow

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add validate workflow step name and more tests

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* optimize the code

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-06-13 14:30:52 +08:00
barnettZQG
75156d5e75 Feat: optimize the API that list and detail definition (#4147)
* 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>
2022-06-13 13:24:30 +08:00
Somefive
2411399683 Feat: support insecure cluster (#4157)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-13 13:14:25 +08:00
kang.feng
f978519e69 Fix: mongoDB datastore can't list special email user(#4104) (#4129)
* 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>
2022-06-10 15:26:48 +08:00
dependabot[bot]
6eca997ddd Chore(deps): Bump github.com/emicklei/go-restful/v3 (#4144)
Bumps [github.com/emicklei/go-restful/v3](https://github.com/emicklei/go-restful) from 3.0.0-rc2 to 3.8.0.
- [Release notes](https://github.com/emicklei/go-restful/releases)
- [Changelog](https://github.com/emicklei/go-restful/blob/v3/CHANGES.md)
- [Commits](https://github.com/emicklei/go-restful/compare/v3.0.0-rc2...v3.8.0)

---
updated-dependencies:
- dependency-name: github.com/emicklei/go-restful/v3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-10 10:19:11 +08:00
Charlie Chiang
f8272d822b Chore: fix potential bot failures (#4141)
* Chore: fix potential bot failures

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Chore: add npm cache

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Chore: fix ubuntu version to 20.04 in issue-commands

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-06-09 22:45:05 +08:00
wyike
cbf9776fea Fix: api not exist don't break whole query process (#4130)
* make resource tree more

resourceTree more robust

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

* log the error

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-06-09 11:36:08 +08:00
ZhongsJie
ca0faa1f46 Fix: vela addon registry get panic (#4135)
Signed-off-by: ZhongsJie <zhongsjie@gmail.com>
2022-06-09 10:15:47 +08:00
JarHMJ
146bcbd9a8 Feat: render color for outputs of vela up command (#4133)
Signed-off-by: huangminjie <minjie.huang@daocloud.io>
2022-06-09 10:15:05 +08:00
Charlie Chiang
b77cdaf5f5 Fix(cli): avoid incorrect addon name when using dot as local addon path (#4126)
* Fix(cli): avoid issues when using dot as local addon path

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test(cli): add tests for `vela addon enable .`

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test(cli): use sample addon to test

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test(cli): fix typos in tests accordingly

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test(cli): correct file path

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test(cli): do not focus single test

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test(cli): fix typos in tests accordingly

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: correct error output

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>

Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-06-09 10:12:19 +08:00
Holger Protzek
deaf309f9b Add description column to vela trait and component command (#4107)
Signed-off-by: Holger Protzek <holger.protzek@springernature.com>
2022-06-08 14:28:32 +08:00
dependabot[bot]
910cb50ac3 Chore(deps): Bump github.com/containerd/containerd from 1.5.10 to 1.5.13 (#4123)
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.5.10 to 1.5.13.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.5.10...v1.5.13)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-07 21:13:24 +08:00
Jianbo Sun
c1ccfb1d83 Fix: bump oamdev/kube-webhook-certgen to v2.4.1 to support arm64 (#4113)
* 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>
2022-06-05 14:16:31 +08:00
Jianbo Sun
05b45fa52c Fix: change the image name in ghcr to align with docker image registry (#4110)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-04 14:11:58 +08:00
Afzal Ansari
373abf4fe7 Fix: refactors lint issues in missing err in json return value (#3828)
* refactors error return value of encoding addon

Signed-off-by: afzal442 <afzal442@gmail.com>

* refactor error return value of encoding kubeapi

Signed-off-by: afzal442 <afzal442@gmail.com>

* refactors error return value of encoding worker

Signed-off-by: afzal442 <afzal442@gmail.com>

* refactors error return value of encoding handle

Signed-off-by: afzal442 <afzal442@gmail.com>

* Modifies the json returned err

Signed-off-by: afzal442 <afzal442@gmail.com>

Skips the err

Signed-off-by: afzal442 <afzal442@gmail.com>

adds suggestion for error()

Signed-off-by: afzal442 <afzal442@gmail.com>

* Adds error return value

Signed-off-by: afzal442 <afzal442@gmail.com>

minor changes

Signed-off-by: afzal442 <afzal442@gmail.com>

* updates extendedfile method and adjusts the error

Signed-off-by: afzal442 <afzal442@gmail.com>

* fixes lint error

Signed-off-by: afzal442 <afzal442@gmail.com>
2022-06-03 15:36:55 +08:00
wyike
a00fee91fc Fix: hold the force uninstalling process untill the last addon been deleted (#4101)
* hold the force uninstalling process untill the last addon been deleted

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

fix lint

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

fix comments

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

fix comments

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

* fix comments

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

fix lint

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

* add period

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-06-02 16:28:08 +08:00
Jianbo Sun
7f3b55efa0 Chore: add @StevenLeiZhang into owners file and ajust for more flexible owners (#4100)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-02 13:34:09 +08:00
StevenLeiZhang
e012bbd1e4 Fix: vela provider delete command's example is wrong (#4094)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-06-02 11:02:19 +08:00
barnettZQG
c82bcf146a Fix: the new default values do not take effect when upgrading the vela core (#4092)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-02 10:22:10 +08:00
barnettZQG
f550e89331 Fix: show the default password (#4091)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-02 10:01:04 +08:00
barnettZQG
f47dc5f598 Fix: load the provider subcommands on demand (#4086)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-01 16:21:18 +08:00
Somefive
985d49d9e6 Feat: use deferred config in CLI (#4083) 2022-06-01 08:31:01 +08:00
wyike
f04f29dff0 Fix(addon): more note info and filter prerelease addon version (#4081)
* more note info and filter prerelease addon version

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

* wrap the error optimize the show info

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

* fix golint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-05-31 18:56:04 +08:00
barnettZQG
ffbd53e3e1 Chore: hide some definitions in VelaUX (#4073)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-31 16:39:36 +08:00
barnettZQG
c691649256 Fix: change the region to customRegion (#4075)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-31 16:17:39 +08:00
StevenLeiZhang
3484e8102d Fix: Improve vela provider add response (#4055)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-05-31 16:14:46 +08:00
Shukun Zhang
f8c24ba912 Feat: vela ql into vela-cli (#3519)
Signed-off-by: Shukun Zhang <2236407598@qq.com>
2022-05-31 16:12:04 +08:00
Jianbo Sun
efb6475f2a Fix: upgrade from v1.3+ to v1.4+ with new secret for cluster-gateway (#4072)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-05-31 16:04:34 +08:00
StevenLeiZhang
f8f0730ed8 Fix: Can not delete terraform provider (#4070)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-05-31 15:01:00 +08:00
barnettZQG
a5cd007311 Chore: change the key features in readme (#4064)
* 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>
2022-05-31 14:26:22 +08:00
barnettZQG
b13eb4adb5 Fix: remove the tcp protocol prefix in the endpoint string (#4059)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-30 20:11:55 +08:00
wyike
48236f69bd Fix: CI workflow for rollout acr image build and push (#4061)
* fix the rollout acr image

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

* fix

test

test

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

finish fix

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

* merge two sction

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-05-30 19:34:57 +08:00
Tianxin Dong
7508794798 Fix: set workflow to finish before record in controller revision (#4060)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-05-30 19:29:23 +08:00
Tianxin Dong
65f17bf37f Fix: fix the dependency gc policy to reverse dependency (#4063)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-05-30 19:27:43 +08:00
barnettZQG
f5267f7654 Fix: the policies can not be deleted (#4057)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-30 16:21:07 +08:00
yangs
c8eb0b4dbd Fix: fail to get the endpoints via the velaql (#4056)
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2022-05-30 15:48:28 +08:00
qiaozp
8fb38672f5 Fix: release script condition syntax (#4042)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-05-28 01:28:19 +08:00
Somefive
383a2bd695 Feat: minimize controller privileges & enforce authentication in multicluster e2e test (#4031)
* Feat: enable auth in multicluster test & restrict controller privileges while enabling authentication

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

* Feat: fix statekeep permission leak & comprev cleanup leak

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

* Fix: use user info in ref-object select

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

* Feat: set legacy-rt-gc to disabled by default

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

* Fix: pending healthscope with authentication test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-28 01:26:06 +08:00
Tianxin Dong
fcfb1012d6 Feat: add if in workflow (#3941)
* Feat: add if in workflow struct

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: implement the if in workflow

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: support dependency and skip for suspend step

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: fix the rebase from sub steps

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: fix the lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: support if in sub steps

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add tests in application controller

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: fix the lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Test: add more tests in discover and custom

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Lint: fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Tests: add more tests in application controller

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: change failed after retries into reason

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: fix the terminate cli

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* remove the terminate workflow to pkg and add feature gates

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* resolve comments

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* nit fix

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* make finish condition more clear

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-05-27 22:01:14 +08:00
Somefive
fd024bc3e2 Fix: env trait error when existing env exists (#4038)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-27 21:07:28 +08:00
wyike
c8264b8c34 some small fixes (#4033)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-05-27 18:36:47 +08:00
barnettZQG
6eb7af9aea Feat: add the creating and deleting permission APIs (#4026)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-27 17:41:29 +08:00
ZhongsJie
39d5ce48dc Feat: add affinity trait to merge node and pod affinity (#3973)
Signed-off-by: ZhongsJie <zhongsjie@gmail.com>
2022-05-27 17:36:39 +08:00
Xiangbo Ma
3538007fc4 Fix: error message of vela init env is not clear (#4016)
Signed-off-by: fourierr <maxiangboo@qq.com>
2022-05-27 17:34:02 +08:00
Xiangbo Ma
83704058af Fix: vela port-forward not working for webservice component (#4007)
Signed-off-by: fourierr <maxiangboo@qq.com>
2022-05-27 17:14:15 +08:00
barnettZQG
1226a14cbd Fix: unknown field ignoreTerraformComponent (#4013)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-27 17:12:19 +08:00
yangs
d0a725b51e Fix: velaql fail to parse query result to json format (#4011)
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2022-05-27 16:23:15 +08:00
Somefive
57309884fc Feat: enhance controller auth by removing useless features & add authentication for componentrevision+healthcheck (#3992)
* Feat: use application identity in gc & componentrevision & collectHealthStatus

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

* Chore: remove useless features and roles

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

* Fix: remove DELETE from mutating webhook

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

* Chore: enhance deploy error display

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

* Fix: e2e test vela cli output match & controllerrevision recycle for serviceaccount impersonation

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-27 15:50:21 +08:00
zq200618
260c831df2 Fix: step group documentation update and bug fix of firstExecuteTime not record (#3975)
Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>

Fix: step group documentation update and bug fix of firstExecuteTime not record

Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>

Co-authored-by: Qiang Zheng <zhengq20018@cmbchina.com>
2022-05-27 11:25:38 +08:00
barnettZQG
3a887ecdf9 Fix: fail to query the count with mongodb (#4012)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-27 10:45:40 +08:00
wyike
adc99bf390 Feat: optimize some logic of topology resource-tree (#4003)
* format

finish tests

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

* add comments

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

no lint

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

* add pvc

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

* go mod tidy

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

* fix panic bug

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

fix panic

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-05-26 22:17:20 +08:00
barnettZQG
1ada3fb467 Fix: optimized the version comparison (#4001)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-26 19:30:19 +08:00
barnettZQG
f3d4db686d Fix: add some default permissions about the configuration (#3998)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-26 17:21:23 +08:00
Somefive
1815dd4962 Feat: upgrade cluster-gateway version (#3986)
* Feat: upgrade cluster-gateway version

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

* Fix: multicluster test unstable

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-26 17:20:28 +08:00
Somefive
5cfc2878b7 Feat: support impersonation for application in apiserver (#3985)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-26 16:42:30 +08:00
StevenLeiZhang
c80b8c0502 Fix: add Target fail by fetch terraform-provider error (#3988)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-05-26 15:45:22 +08:00
StevenLeiZhang
dc8f558d8a Fix: delete Project fail (#3981)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-05-26 11:30:54 +08:00
qiaozp
46bdc8025e Fix: don't update version file when publish alpha/beta version (#3989)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-05-26 11:30:29 +08:00
Jianbo Sun
9244efe813 Feat: build docker image(oamdev/vela-cli) for vela-cli (#3976)
fixes #1392

One of the use case could be https://github.com/kubevela/kubevela/discussions/3821

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-05-26 10:27:31 +08:00
barnettZQG
4288b216e2 Fix: initialize kube config multiple times (#3984)
* Fix: initialize kube config multiple times

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

* Fix: e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-26 10:19:05 +08:00
wyike
dae0358bc0 Feat: mechanism to let user add relationship mapping rule by configmap (#3968)
* WIP add some code

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

small fix

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

fix all tests

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

* add comment

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

fix ci

delete useless code

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

go mod vendor

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

* fix failed test

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

* more test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-05-25 16:44:46 +08:00
Xiangbo Ma
dfb33e0ea7 Fix: kustomize not read environment variables (#3970)
Signed-off-by: fourierr <maxiangboo@qq.com>
2022-05-25 11:22:35 +08:00
706 changed files with 35864 additions and 7805 deletions

24
.github/CODEOWNERS vendored
View File

@@ -1,14 +1,14 @@
# 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
* @barnettZQG @wonderflow @leejanee
design/ @barnettZQG @leejanee @wonderflow
* @barnettZQG @wonderflow @leejanee @Somefive
design/ @barnettZQG @leejanee @wonderflow @Somefive
# Owner of CUE
pkg/cue @leejanee @FogDong
pkg/stdlib @leejanee @FogDong
pkg/cue @leejanee @FogDong @Somefive
pkg/stdlib @leejanee @FogDong @Somefive
# Owner of Workflow
pkg/workflow @leejanee @FogDong
pkg/workflow @leejanee @FogDong @Somefive
# Owner of rollout
pkg/controller/common/rollout/ @wangyikewxgm @wonderflow
@@ -17,20 +17,20 @@ pkg/controller/standard.oam.dev/v1alpha1/rollout @wangyikewxgm @wonde
runtime/rollout @wangyikewxgm @wonderflow
# Owner of definition controller
pkg/controller/core.oam.dev/v1alpha2/core/workflow/workflowstepdefinition @yangsoon @Somefive
pkg/controller/core.oam.dev/v1alpha2/core/policies/policydefinition @yangsoon @Somefive
pkg/controller/core.oam.dev/v1alpha2/core/components/componentdefinition @yangsoon @zzxwill
pkg/controller/core.oam.dev/v1alpha2/core/traits/traitdefinition @yangsoon @zzxwill
pkg/controller/core.oam.dev/v1alpha2/core/workflow/workflowstepdefinition @yangsoon @Somefive @FogDong
pkg/controller/core.oam.dev/v1alpha2/core/policies/policydefinition @yangsoon @Somefive @FogDong
pkg/controller/core.oam.dev/v1alpha2/core/components/componentdefinition @yangsoon @zzxwill @Somefive
pkg/controller/core.oam.dev/v1alpha2/core/traits/traitdefinition @yangsoon @zzxwill @Somefive
# Owner of health scope controller
pkg/controller/core.oam.dev/v1alpha2/core/scopes/healthscope @captainroy-hy @zzxwill
pkg/controller/core.oam.dev/v1alpha2/core/scopes/healthscope @captainroy-hy @zzxwill @yangsoon
# Owner of vela templates
vela-templates/ @Somefive @barnettZQG @wonderflow
# Owner of vela CLI
references/cli/ @Somefive @zzxwill
references/cli/ @Somefive @zzxwill @StevenLeiZhang
# Owner of vela APIServer
pkg/apiserver/ @barnettZQG @yangsoon
pkg/apiserver/ @barnettZQG @yangsoon @FogDong

View File

@@ -1,4 +1,4 @@
name: APIServer Unit Test & E2E Test
name: VelaUX APIServer Test
on:
push:
@@ -19,9 +19,8 @@ env:
# Common versions
GO_VERSION: '1.17'
GOLANGCI_VERSION: 'v1.38'
KIND_VERSION: 'v0.7.0'
KIND_IMAGE_VERSION: '[\"v1.20.7\"]'
KIND_IMAGE_VERSIONS: '[\"v1.18.20\",\"v1.20.7\",\"v1.22.7\"]'
K3D_IMAGE_VERSION: '[\"v1.20\",\"v1.24\"]'
K3D_IMAGE_VERSIONS: '[\"v1.20\",\"v1.24\"]'
jobs:
@@ -32,7 +31,7 @@ jobs:
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@v3.3.0
uses: fkirc/skip-duplicate-actions@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
@@ -48,19 +47,72 @@ jobs:
run: |
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
echo "pushing tag: ${{ github.ref_name }}"
echo "::set-output name=matrix::${{ env.KIND_IMAGE_VERSIONS }}"
echo "::set-output name=matrix::${{ env.K3D_IMAGE_VERSIONS }}"
else
echo "::set-output name=matrix::${{ env.KIND_IMAGE_VERSION }}"
echo "::set-output name=matrix::${{ env.K3D_IMAGE_VERSION }}"
fi
apiserver-unit-tests:
runs-on: aliyun
runs-on: ubuntu-20.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
submodules: true
- name: Cache Go Dependencies
uses: actions/cache@v2
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-pkg-
- name: Install ginkgo
run: |
sudo apt-get install -y golang-ginkgo-dev
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.7.0
with:
mongodb-version: '5.0'
- name: install Kubebuilder
uses: RyanSiu1995/kubebuilder-action@v1.2
with:
version: 3.1.0
kubebuilderOnly: false
kubernetesVersion: v1.21.2
- name: Run api server unit test
run: make unit-test-apiserver
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
flags: apiserver-unittests
name: codecov-umbrella
apiserver-e2e-tests:
runs-on: aliyun-legacy
needs: [ detect-noop,set-k8s-matrix ]
if: needs.detect-noop.outputs.noop != 'true'
strategy:
matrix:
k8s-version: ${{ fromJson(needs.set-k8s-matrix.outputs.matrix) }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true
steps:
- name: Set up Go
@@ -78,38 +130,50 @@ jobs:
run: |
go get -v -t -d ./...
- name: Setup Kind
uses: engineerd/setup-kind@v0.5.0
- name: Tear down K3d if exist
run: |
k3d cluster delete || true
k3d cluster delete worker || true
- name: Calculate K3d args
run: |
EGRESS_ARG=""
if [[ "${{ matrix.k8s-version }}" == v1.24 ]]; then
EGRESS_ARG="--k3s-arg --egress-selector-mode=disabled@server:0"
fi
echo "EGRESS_ARG=${EGRESS_ARG}" >> $GITHUB_ENV
- name: Setup K3d (Hub)
uses: nolar/setup-k3d-k3s@v1.0.8
with:
version: ${{ env.KIND_VERSION }}
skipClusterCreation: true
version: ${{ matrix.k8s-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
k3d-args: ${{ env.EGRESS_ARG }}
- name: Setup Kind Cluster (Worker)
- name: Setup K3d (Worker)
uses: nolar/setup-k3d-k3s@v1.0.8
with:
version: ${{ matrix.k8s-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
k3d-name: worker
k3d-args: --kubeconfig-update-default=false --network=k3d-k3s-default ${{ env.EGRESS_ARG }}
- name: Kind Cluster (Worker)
run: |
kind delete cluster --name worker
kind create cluster --image kindest/node:${{ matrix.k8s-version }} --name worker
kubectl version
kubectl cluster-info
kind get kubeconfig --name worker --internal > /tmp/worker.kubeconfig
kind get kubeconfig --name worker > /tmp/worker.client.kubeconfig
internal_ip=$(docker network inspect k3d-k3s-default|jq ".[0].Containers"| jq -r '.[]| select(.Name=="k3d-worker-server-0")|.IPv4Address' | cut -d/ -f1)
k3d kubeconfig get worker > /tmp/worker.client.kubeconfig
cp /tmp/worker.client.kubeconfig /tmp/worker.kubeconfig
sed -i "s/0.0.0.0:[0-9]\+/$internal_ip:6443/" /tmp/worker.kubeconfig
- name: Setup Kind Cluster (Hub)
run: |
kind delete cluster
kind create cluster --image kindest/node:${{ matrix.k8s-version }}
kubectl version
kubectl cluster-info
- name: Run api server unit test
run: make unit-test-apiserver
- name: Load Image to kind cluster
run: make kind-load
- name: Load image to k3d cluster
run: make image-load
- name: Cleanup for e2e tests
run: |
make e2e-cleanup
make vela-cli
make e2e-cleanup
make e2e-setup-core
bin/vela addon enable fluxcd
timeout 600s bash -c -- 'while true; do kubectl get ns flux-system; if [ $? -eq 0 ] ; then break; else sleep 5; fi;done'
@@ -131,8 +195,8 @@ jobs:
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.txt,/tmp/e2e_apiserver_test.out
flags: apiserver-unittests
files: /tmp/e2e_apiserver_test.out
flags: apiserver-e2etests
name: codecov-umbrella
- name: Clean e2e profile

View File

@@ -21,7 +21,11 @@ jobs:
MINIMAL_HELM_CHART: charts/vela-minimal
LEGACY_HELM_CHART: legacy/charts/vela-core-legacy
VELA_ROLLOUT_HELM_CHART: runtime/rollout/charts
LOCAL_OSS_DIRECTORY: .oss/
LOCAL_OSS_DIRECTORY: .oss
HELM_CHART_NAME: vela-core
MINIMAL_HELM_CHART_NAME: vela-minimal
LEGACY_HELM_CHART_NAME: vela-core-legacy
VELA_ROLLOUT_HELM_CHART_NAME: vela-rollout
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
@@ -86,4 +90,11 @@ jobs:
helm package $VELA_ROLLOUT_HELM_CHART --destination $LOCAL_OSS_DIRECTORY
helm repo index --url https://$BUCKET.$ENDPOINT/core $LOCAL_OSS_DIRECTORY
- name: sync local to cloud
run: ./ossutil --config-file .ossutilconfig sync $LOCAL_OSS_DIRECTORY oss://$BUCKET/core -f
run: |
image_tag=${{ steps.get_version.outputs.VERSION }}
chart_semver=${image_tag#"v"}
./ossutil --config-file .ossutilconfig cp -f $LOCAL_OSS_DIRECTORY/index.yaml oss://$BUCKET/core/index.yaml
./ossutil --config-file .ossutilconfig cp -f $LOCAL_OSS_DIRECTORY/$HELM_CHART_NAME-${chart_semver}.tgz oss://$BUCKET/core/$HELM_CHART_NAME-${chart_semver}.tgz
./ossutil --config-file .ossutilconfig cp -f $LOCAL_OSS_DIRECTORY/$MINIMAL_HELM_CHART_NAME-${chart_semver}.tgz oss://$BUCKET/core/$MINIMAL_HELM_CHART_NAME-${chart_semver}.tgz
./ossutil --config-file .ossutilconfig cp -f $LOCAL_OSS_DIRECTORY/$LEGACY_HELM_CHART_NAME-${chart_semver}.tgz oss://$BUCKET/core/$LEGACY_HELM_CHART_NAME-${chart_semver}.tgz
./ossutil --config-file .ossutilconfig cp -f $LOCAL_OSS_DIRECTORY/$VELA_ROLLOUT_HELM_CHART_NAME-${chart_semver}.tgz oss://$BUCKET/core/$VELA_ROLLOUT_HELM_CHART_NAME-${chart_semver}.tgz

View File

@@ -17,9 +17,8 @@ env:
# Common versions
GO_VERSION: '1.17'
GOLANGCI_VERSION: 'v1.38'
KIND_VERSION: 'v0.7.0'
KIND_IMAGE_VERSION: '[\"v1.20.7\"]'
KIND_IMAGE_VERSIONS: '[\"v1.18.20\",\"v1.20.7\",\"v1.22.7\"]'
K3D_IMAGE_VERSION: '[\"v1.20\",\"v1.24\"]'
K3D_IMAGE_VERSIONS: '[\"v1.20\",\"v1.24\"]'
jobs:
@@ -30,7 +29,7 @@ jobs:
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@v3.3.0
uses: fkirc/skip-duplicate-actions@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
@@ -46,19 +45,22 @@ jobs:
run: |
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
echo "pushing tag: ${{ github.ref_name }}"
echo "::set-output name=matrix::${{ env.KIND_IMAGE_VERSIONS }}"
echo "::set-output name=matrix::${{ env.K3D_IMAGE_VERSIONS }}"
else
echo "::set-output name=matrix::${{ env.KIND_IMAGE_VERSION }}"
echo "::set-output name=matrix::${{ env.K3D_IMAGE_VERSION }}"
fi
e2e-multi-cluster-tests:
runs-on: aliyun
runs-on: aliyun-legacy
needs: [ detect-noop,set-k8s-matrix ]
if: needs.detect-noop.outputs.noop != 'true'
strategy:
matrix:
k8s-version: ${{ fromJson(needs.set-k8s-matrix.outputs.matrix) }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true
steps:
@@ -74,37 +76,49 @@ jobs:
run: |
go get -v -t -d ./...
- name: Setup Kind
uses: engineerd/setup-kind@v0.5.0
- name: Tear down K3d if exist
run: |
k3d cluster delete || true
k3d cluster delete worker || true
- name: Calculate K3d args
run: |
EGRESS_ARG=""
if [[ "${{ matrix.k8s-version }}" == v1.24 ]]; then
EGRESS_ARG="--k3s-arg --egress-selector-mode=disabled@server:0"
fi
echo "EGRESS_ARG=${EGRESS_ARG}" >> $GITHUB_ENV
- name: Setup K3d (Hub)
uses: nolar/setup-k3d-k3s@v1.0.8
with:
version: ${{ env.KIND_VERSION }}
skipClusterCreation: true
version: ${{ matrix.k8s-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
k3d-args: ${{ env.EGRESS_ARG }}
- name: Setup Kind Cluster (Worker)
- name: Setup K3d (Worker)
uses: nolar/setup-k3d-k3s@v1.0.8
with:
version: ${{ matrix.k8s-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
k3d-name: worker
k3d-args: --kubeconfig-update-default=false --network=k3d-k3s-default ${{ env.EGRESS_ARG }}
- name: Generating internal worker kubeconfig
run: |
kind delete cluster --name worker
kind create cluster --image kindest/node:${{ matrix.k8s-version }} --name worker
kubectl version
kubectl cluster-info
kind get kubeconfig --name worker --internal > /tmp/worker.kubeconfig
kind get kubeconfig --name worker > /tmp/worker.client.kubeconfig
internal_ip=$(docker network inspect k3d-k3s-default|jq ".[0].Containers"| jq -r '.[]| select(.Name=="k3d-worker-server-0")|.IPv4Address' | cut -d/ -f1)
k3d kubeconfig get worker > /tmp/worker.client.kubeconfig
cp /tmp/worker.client.kubeconfig /tmp/worker.kubeconfig
sed -i "s/0.0.0.0:[0-9]\+/$internal_ip:6443/" /tmp/worker.kubeconfig
- name: Setup Kind Cluster (Hub)
run: |
kind delete cluster
kind create cluster --image kindest/node:${{ matrix.k8s-version }}
kubectl version
kubectl cluster-info
- name: Load Image to kind cluster (Hub)
run: make kind-load
- name: Load image to k3d cluster (hub and worker)
run: make image-load image-load-runtime-cluster
- name: Cleanup for e2e tests
run: |
make e2e-cleanup
make vela-cli
make e2e-cleanup
make e2e-setup-core-auth
make
make setup-runtime-e2e-cluster
- name: Run e2e multicluster tests

View File

@@ -17,9 +17,8 @@ env:
# Common versions
GO_VERSION: '1.17'
GOLANGCI_VERSION: 'v1.38'
KIND_VERSION: 'v0.7.0'
KIND_IMAGE_VERSION: '[\"v1.20.7\"]'
KIND_IMAGE_VERSIONS: '[\"v1.18.20\",\"v1.20.7\",\"v1.22.7\"]'
K3D_IMAGE_VERSION: '[\"v1.20\",\"v1.24\"]'
K3D_IMAGE_VERSIONS: '[\"v1.20\",\"v1.24\"]'
jobs:
@@ -30,7 +29,7 @@ jobs:
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@v3.3.0
uses: fkirc/skip-duplicate-actions@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
@@ -46,18 +45,22 @@ jobs:
run: |
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
echo "pushing tag: ${{ github.ref_name }}"
echo "::set-output name=matrix::${{ env.KIND_IMAGE_VERSIONS }}"
echo "::set-output name=matrix::${{ env.K3D_IMAGE_VERSIONS }}"
else
echo "::set-output name=matrix::${{ env.KIND_IMAGE_VERSION }}"
echo "::set-output name=matrix::${{ env.K3D_IMAGE_VERSION }}"
fi
e2e-rollout-tests:
runs-on: aliyun
runs-on: aliyun-legacy
needs: [ detect-noop,set-k8s-matrix ]
if: needs.detect-noop.outputs.noop != 'true'
strategy:
matrix:
k8s-version: ${{ fromJson(needs.set-k8s-matrix.outputs.matrix) }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true
steps:
- name: Check out code into the Go module directory
@@ -72,33 +75,35 @@ jobs:
run: |
go get -v -t -d ./...
- name: Setup Kind
uses: engineerd/setup-kind@v0.5.0
with:
version: ${{ env.KIND_VERSION }}
skipClusterCreation: true
- name: Setup Kind Cluster
- name: Tear down K3d if exist
run: |
kind delete cluster
kind create cluster --image kindest/node:${{ matrix.k8s-version }}
kubectl version
kubectl cluster-info
k3d cluster delete || true
k3d cluster delete worker || true
- name: Load Image to kind cluster
run: make kind-load
- name: Calculate K3d args
run: |
EGRESS_ARG=""
if [[ "${{ matrix.k8s-version }}" == v1.24 ]]; then
EGRESS_ARG="--k3s-arg --egress-selector-mode=disabled@server:0"
fi
echo "EGRESS_ARG=${EGRESS_ARG}" >> $GITHUB_ENV
- name: Run Make
run: make
- name: Setup K3d
uses: nolar/setup-k3d-k3s@v1.0.8
with:
version: ${{ matrix.k8s-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
k3d-args: ${{ env.EGRESS_ARG }}
- name: Run Make Manager
run: make manager
- name: Load image to k3d cluster
run: make image-load image-load-runtime-cluster
- name: Prepare for e2e tests
run: |
make vela-cli
make e2e-cleanup
make e2e-setup
helm lint ./charts/vela-core
make e2e-setup-core
make setup-runtime-e2e-cluster
helm test -n vela-system kubevela --timeout 5m
- name: Run e2e tests

View File

@@ -17,9 +17,8 @@ env:
# Common versions
GO_VERSION: '1.17'
GOLANGCI_VERSION: 'v1.38'
KIND_VERSION: 'v0.7.0'
KIND_IMAGE_VERSION: '[\"v1.20.7\"]'
KIND_IMAGE_VERSIONS: '[\"v1.18.20\",\"v1.20.7\",\"v1.22.7\"]'
K3D_IMAGE_VERSION: '[\"v1.20\",\"v1.24\"]'
K3D_IMAGE_VERSIONS: '[\"v1.20\",\"v1.24\"]'
jobs:
@@ -30,7 +29,7 @@ jobs:
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@v3.3.0
uses: fkirc/skip-duplicate-actions@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
@@ -46,18 +45,22 @@ jobs:
run: |
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
echo "pushing tag: ${{ github.ref_name }}"
echo "::set-output name=matrix::${{ env.KIND_IMAGE_VERSIONS }}"
echo "::set-output name=matrix::${{ env.K3D_IMAGE_VERSIONS }}"
else
echo "::set-output name=matrix::${{ env.KIND_IMAGE_VERSION }}"
echo "::set-output name=matrix::${{ env.K3D_IMAGE_VERSION }}"
fi
e2e-tests:
runs-on: aliyun
runs-on: aliyun-legacy
needs: [ detect-noop,set-k8s-matrix ]
if: needs.detect-noop.outputs.noop != 'true'
strategy:
matrix:
k8s-version: ${{ fromJson(needs.set-k8s-matrix.outputs.matrix) }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true
steps:
- name: Check out code into the Go module directory
@@ -72,33 +75,36 @@ jobs:
run: |
go get -v -t -d ./...
- name: Setup Kind
uses: engineerd/setup-kind@v0.5.0
with:
version: ${{ env.KIND_VERSION }}
skipClusterCreation: true
- name: Setup Kind Cluster
- name: Tear down K3d if exist
run: |
kind delete cluster
kind create cluster --image kindest/node:${{ matrix.k8s-version }}
kubectl version
kubectl cluster-info
k3d cluster delete || true
k3d cluster delete worker || true
- name: Load Image to kind cluster
run: make kind-load
- name: Calculate K3d args
run: |
EGRESS_ARG=""
if [[ "${{ matrix.k8s-version }}" == v1.24 ]]; then
EGRESS_ARG="--k3s-arg --egress-selector-mode=disabled@server:0"
fi
echo "EGRESS_ARG=${EGRESS_ARG}" >> $GITHUB_ENV
- name: Setup K3d
uses: nolar/setup-k3d-k3s@v1.0.8
with:
version: ${{ matrix.k8s-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
k3d-args: ${{ env.EGRESS_ARG }}
- name: Load image to k3d cluster
run: make image-load
- name: Run Make
run: make
- name: Run Make Manager
run: make manager
- name: Prepare for e2e tests
run: |
make e2e-cleanup
make e2e-setup
helm lint ./charts/vela-core
make e2e-setup-core
helm test -n vela-system kubevela --timeout 5m
- name: Run api e2e tests

View File

@@ -15,7 +15,6 @@ env:
# Common versions
GO_VERSION: '1.17'
GOLANGCI_VERSION: 'v1.38'
KIND_VERSION: 'v0.7.0'
jobs:
@@ -26,7 +25,7 @@ jobs:
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@v3.3.0
uses: fkirc/skip-duplicate-actions@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
@@ -98,7 +97,7 @@ jobs:
version: ${{ env.GOLANGCI_VERSION }}
check-diff:
runs-on: aliyun
runs-on: aliyun-legacy
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'

View File

@@ -7,7 +7,7 @@ on:
jobs:
bot:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -15,7 +15,13 @@ jobs:
repository: "oam-dev/kubevela-github-actions"
path: ./actions
ref: v0.4.2
- name: Install Actions
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '14'
cache: 'npm'
cache-dependency-path: ./actions/package-lock.json
- name: Install Dependencies
run: npm ci --production --prefix ./actions
- name: Run Commands
uses: ./actions/commands

View File

@@ -150,11 +150,15 @@ jobs:
- name: Display structure of downloaded files
run: ls -R
working-directory: cli-artifacts
- name: Get version
run: echo "VELA_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- shell: bash
working-directory: cli-artifacts
run: |
for file in *
do
sed -i "s/\/vela/-${{ env.VELA_VERSION }}/g" ${file}
sed -i "s/\/kubectl-vela/-${{ env.VELA_VERSION }}/g" ${file}
cat ${file} >> sha256sums.txt
done
- name: Upload Checksums

View File

@@ -4,7 +4,7 @@ on:
- cron: '* * * * *'
jobs:
clean-image:
runs-on: aliyun
runs-on: aliyun-legacy
steps:
- name: Cleanup image
run: docker image prune -f

View File

@@ -15,7 +15,6 @@ env:
# Common versions
GO_VERSION: '1.17'
GOLANGCI_VERSION: 'v1.38'
KIND_VERSION: 'v0.7.0'
jobs:
@@ -26,7 +25,7 @@ jobs:
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@v3.3.0
uses: fkirc/skip-duplicate-actions@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
@@ -61,10 +60,11 @@ jobs:
run: |
sudo apt-get install -y golang-ginkgo-dev
- name: Setup Kind Cluster
uses: engineerd/setup-kind@v0.5.0
- name: Setup K3d
uses: nolar/setup-k3d-k3s@v1.0.8
with:
version: ${{ env.KIND_VERSION }}
version: v1.20
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: install Kubebuilder
uses: RyanSiu1995/kubebuilder-action@v1.2

6
.gitignore vendored
View File

@@ -1,4 +1,4 @@
# Binaries for programs and plugins
# Binaries for programs and docgen
*.exe
*.exe~
*.dll
@@ -7,6 +7,7 @@
bin
_bin
e2e/vela
vela
# Test binary, build with `go test -c`
*.test
@@ -49,4 +50,5 @@ tmp/
git-page/
# e2e rollout runtime image build
runtime/rollout/e2e/tmp
runtime/rollout/e2e/tmp
vela.json

View File

@@ -15,7 +15,7 @@ This is a minor fix for release-1.0, please refer to release-1.1.x for the lates
# v1.0.5
1. Fix Terraform application status issue (#1611)
2. applicaiton supports specifying different versions of Definition (#1597)
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)

View File

@@ -31,7 +31,7 @@
## What's Changed
* Fix: can't query data from the MongoDB by @barnettZQG in https://github.com/oam-dev/kubevela/pull/3095
* Fix: use personel token of vela-bot instead of github token for homebrew update by @wonderflow in https://github.com/oam-dev/kubevela/pull/3096
* Fix: use personal token of vela-bot instead of github token for homebrew update by @wonderflow in https://github.com/oam-dev/kubevela/pull/3096
* Fix: acr image no version by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/3100
* Fix: support generate cloud resource docs in Chinese by @zzxwill in https://github.com/oam-dev/kubevela/pull/3079
* Fix: clear old data in mongodb unit test case by @barnettZQG in https://github.com/oam-dev/kubevela/pull/3103

View File

@@ -39,5 +39,5 @@ RUN apk add --no-cache ca-certificates bash expat
WORKDIR /
ARG TARGETARCH
COPY --from=builder /workspace/vela-${TARGETARCH} /vela
ENTRYPOINT ["/vela"]
COPY --from=builder /workspace/vela-${TARGETARCH} /bin/vela
ENTRYPOINT ["/bin/vela"]

View File

@@ -14,7 +14,7 @@ test: vet lint staticcheck unit-test-core test-cli-gen
test-cli-gen:
mkdir -p ./bin/doc
go run ./hack/docgen/gen.go ./bin/doc
go run ./hack/docgen/cli/gen.go ./bin/doc
unit-test-core:
go test -coverprofile=coverage.txt $(shell go list ./pkg/... ./cmd/... ./apis/... | grep -v apiserver | grep -v applicationconfiguration)
go test $(shell go list ./references/... | grep -v apiserver)
@@ -82,17 +82,17 @@ endif
# load docker image to the kind cluster
kind-load: kind-load-runtime-cluster
# load docker image to the k3d cluster
image-load:
docker build -t $(VELA_CORE_TEST_IMAGE) -f Dockerfile.e2e .
kind load docker-image $(VELA_CORE_TEST_IMAGE) || { echo >&2 "kind not installed or error loading image: $(VELA_CORE_TEST_IMAGE)"; exit 1; }
k3d image import $(VELA_CORE_TEST_IMAGE) || { echo >&2 "kind not installed or error loading image: $(VELA_CORE_TEST_IMAGE)"; exit 1; }
kind-load-runtime-cluster:
image-load-runtime-cluster:
/bin/sh hack/e2e/build_runtime_rollout.sh
docker build -t $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE) -f runtime/rollout/e2e/Dockerfile.e2e runtime/rollout/e2e/
rm -rf runtime/rollout/e2e/tmp
kind load docker-image $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE) || { echo >&2 "kind not installed or error loading image: $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE)"; exit 1; }
kind load docker-image $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE) --name=$(RUNTIME_CLUSTER_NAME) || { echo >&2 "kind not installed or error loading image: $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE)"; exit 1; }
k3d image import $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE) || { echo >&2 "kind not installed or error loading image: $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE)"; exit 1; }
k3d cluster get $(RUNTIME_CLUSTER_NAME) && k3d image import $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE) --cluster=$(RUNTIME_CLUSTER_NAME) || echo "no worker cluster"
# Run tests
core-test: fmt vet manifests

View File

@@ -21,23 +21,29 @@
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.
![](docs/resources/what-is-kubevela.png)
![kubevela](docs/resources/what-is-kubevela.png)
## Highlights
KubeVela practices the "render, orchestrate, deploy" workflow with below highlighted values added to existing ecosystem:
- *Application Centric* - KubeVela introduces [Open Application Model (OAM)](https://oam.dev/) as the consistent yet higher level API to capture and render a full deployment of microservices on top of hybrid environments. Placement strategy, traffic shifting and rolling update are declared at application level. No infrastructure level concern, simply deploy.
* Deployment as Code
- *Programmable Workflow* - KubeVela models application delivery as DAG (Directed Acyclic Graph) and expresses it with [CUE](https://cuelang.org/) - a modern data configuration language. This allows you to design application deployment steps per needs and orchestrate them in programmable approach. No restrictions, natively extensible.
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/).
- *Infrastructure Agnostic* - KubeVela works as an application delivery control plane that is fully decoupled from runtime infrastructure. It can deploy any workload types including containers, cloud services, databases, or even VM instances to any cloud or Kubernetes cluster, following the workflow designed by you.
* Built-in security and compliance building blocks
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.
* Multi-cloud/hybrid-environments app delivery as first-class citizen
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.
## Getting Started
- [Introduction](https://kubevela.io/docs)
- [Installation](https://kubevela.io/docs/install)
- [Design Your First Deployment Plan](https://kubevela.io/docs/quick-start)
* [Introduction](https://kubevela.io/docs)
* [Installation](https://kubevela.io/docs/install)
* [Deploy Your Application](https://kubevela.io/docs/quick-start)
## Documentation
@@ -49,7 +55,7 @@ Official blog is available on [KubeVela blog](https://kubevela.io/blog).
## Community
We want your contributions and suggestions!
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).
@@ -69,23 +75,17 @@ Every two weeks we host a community call to showcase new features, review upcomi
- Bi-weekly Community Call:
- [Meeting Notes](https://docs.google.com/document/d/1nqdFEyULekyksFHtFvgvFAYE-0AMHKoS3RMnaKsarjs).
- [Video Records](https://kubevela.io/videos/meetings/en/meetings).
- [Video Records](https://www.youtube.com/channel/UCSCTHhGI5XJ0SEhDHVakPAA/videos).
- Bi-weekly Chinese Community Call:
- [Video Records](https://kubevela.io/videos/meetings/cn/v1.3).
- [Video Records](https://space.bilibili.com/180074935/channel/seriesdetail?sid=1842207).
## Talks and Conferences
| Engagement | Link |
|:-----------|:------------|
| 🎤 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)|
For more talks, please checkout [KubeVela Talks](https://kubevela.io/videos/talks/en/standardizing-app).
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

View File

@@ -216,19 +216,19 @@ type WorkflowState string
const (
// WorkflowStateInitializing means the workflow is in initial state
WorkflowStateInitializing WorkflowState = "initializing"
WorkflowStateInitializing WorkflowState = "Initializing"
// WorkflowStateTerminated means workflow is terminated manually, and it won't be started unless the spec changed.
WorkflowStateTerminated WorkflowState = "terminated"
WorkflowStateTerminated WorkflowState = "Terminated"
// WorkflowStateSuspended means workflow is suspended manually, and it can be resumed.
WorkflowStateSuspended WorkflowState = "suspended"
WorkflowStateSuspended WorkflowState = "Suspended"
// WorkflowStateSucceeded means workflow is running successfully, all steps finished.
WorkflowStateSucceeded WorkflowState = "Succeeded"
// WorkflowStateFinished means workflow is end.
WorkflowStateFinished WorkflowState = "finished"
WorkflowStateFinished WorkflowState = "Finished"
// WorkflowStateExecuting means workflow is still running or waiting some steps.
WorkflowStateExecuting WorkflowState = "executing"
WorkflowStateExecuting WorkflowState = "Executing"
// WorkflowStateSkipping means it will skip this reconcile and let next reconcile to handle it.
WorkflowStateSkipping WorkflowState = "skipping"
WorkflowStateSkipping WorkflowState = "Skipping"
)
// ApplicationComponentStatus record the health status of App component
@@ -342,6 +342,8 @@ type WorkflowStep struct {
Type string `json:"type"`
Meta *WorkflowStepMeta `json:"meta,omitempty"`
// +kubebuilder:pruning:PreserveUnknownFields
Properties *runtime.RawExtension `json:"properties,omitempty"`
@@ -349,6 +351,8 @@ type WorkflowStep struct {
If string `json:"if,omitempty"`
Timeout string `json:"timeout,omitempty"`
DependsOn []string `json:"dependsOn,omitempty"`
Inputs StepInputs `json:"inputs,omitempty"`
@@ -356,6 +360,11 @@ type WorkflowStep struct {
Outputs StepOutputs `json:"outputs,omitempty"`
}
// WorkflowStepMeta contains the meta data of a workflow step
type WorkflowStepMeta struct {
Alias string `json:"alias,omitempty"`
}
// WorkflowSubStep defines how to execute a workflow subStep.
type WorkflowSubStep struct {
// Name is the unique name of the workflow step.
@@ -363,11 +372,15 @@ type WorkflowSubStep struct {
Type string `json:"type"`
Meta *WorkflowStepMeta `json:"meta,omitempty"`
// +kubebuilder:pruning:PreserveUnknownFields
Properties *runtime.RawExtension `json:"properties,omitempty"`
If string `json:"if,omitempty"`
Timeout string `json:"timeout,omitempty"`
DependsOn []string `json:"dependsOn,omitempty"`
Inputs StepInputs `json:"inputs,omitempty"`
@@ -407,6 +420,8 @@ const (
WorkflowStepPhaseStopped WorkflowStepPhase = "stopped"
// WorkflowStepPhaseRunning will make the controller continue the workflow.
WorkflowStepPhaseRunning WorkflowStepPhase = "running"
// WorkflowStepPhasePending will make the controller wait for the step to run.
WorkflowStepPhasePending WorkflowStepPhase = "pending"
)
// DefinitionType describes the type of DefinitionRevision.

View File

@@ -684,6 +684,11 @@ func (in *WorkflowStatus) DeepCopy() *WorkflowStatus {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkflowStep) DeepCopyInto(out *WorkflowStep) {
*out = *in
if in.Meta != nil {
in, out := &in.Meta, &out.Meta
*out = new(WorkflowStepMeta)
**out = **in
}
if in.Properties != nil {
in, out := &in.Properties, &out.Properties
*out = new(runtime.RawExtension)
@@ -723,6 +728,21 @@ func (in *WorkflowStep) DeepCopy() *WorkflowStep {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkflowStepMeta) DeepCopyInto(out *WorkflowStepMeta) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStepMeta.
func (in *WorkflowStepMeta) DeepCopy() *WorkflowStepMeta {
if in == nil {
return nil
}
out := new(WorkflowStepMeta)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkflowStepStatus) DeepCopyInto(out *WorkflowStepStatus) {
*out = *in
@@ -749,6 +769,11 @@ func (in *WorkflowStepStatus) DeepCopy() *WorkflowStepStatus {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkflowSubStep) DeepCopyInto(out *WorkflowSubStep) {
*out = *in
if in.Meta != nil {
in, out := &in.Meta, &out.Meta
*out = new(WorkflowStepMeta)
**out = **in
}
if in.Properties != nil {
in, out := &in.Properties, &out.Properties
*out = new(runtime.RawExtension)

View File

@@ -53,15 +53,7 @@ func (in ApplyOncePolicySpec) FindStrategy(manifest *unstructured.Unstructured)
return nil
}
for _, rule := range in.Rules {
match := func(src []string, val string) (found bool) {
for _, _val := range src {
found = found || _val == val
}
return val != "" && found
}
if (match(rule.Selector.CompNames, manifest.GetName()) && match(rule.Selector.ResourceTypes, manifest.GetKind())) ||
(rule.Selector.CompNames == nil && match(rule.Selector.ResourceTypes, manifest.GetKind()) ||
(rule.Selector.ResourceTypes == nil && match(rule.Selector.CompNames, manifest.GetName()))) {
if rule.Selector.Match(manifest) {
return rule.Strategy
}
}

View File

@@ -25,6 +25,8 @@ const (
type RefObjectsComponentSpec struct {
// Objects the referrers to the Kubernetes objects
Objects []ObjectReferrer `json:"objects,omitempty"`
// URLs are the links that stores the referred objects
URLs []string `json:"urls,omitempty"`
}
// ObjectReferrer selects Kubernetes objects

View File

@@ -18,6 +18,8 @@ package v1alpha1
import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/utils/pointer"
"k8s.io/utils/strings/slices"
"github.com/oam-dev/kubevela/pkg/oam"
)
@@ -56,16 +58,56 @@ type GarbageCollectPolicyRule struct {
}
// ResourcePolicyRuleSelector select the targets of the rule
// 1) for GarbageCollectPolicyRule
// if both traitTypes, oamTypes and componentTypes are specified, combination logic is OR
// if one resource is specified with conflict strategies, strategy as component go first.
// 2) for ApplyOncePolicyRule only CompNames and ResourceTypes are used
// if multiple conditions are specified, combination logic is AND
type ResourcePolicyRuleSelector struct {
CompNames []string `json:"componentNames"`
CompTypes []string `json:"componentTypes"`
OAMResourceTypes []string `json:"oamTypes"`
TraitTypes []string `json:"traitTypes"`
ResourceTypes []string `json:"resourceTypes"`
CompNames []string `json:"componentNames,omitempty"`
CompTypes []string `json:"componentTypes,omitempty"`
OAMResourceTypes []string `json:"oamTypes,omitempty"`
TraitTypes []string `json:"traitTypes,omitempty"`
ResourceTypes []string `json:"resourceTypes,omitempty"`
ResourceNames []string `json:"resourceNames,omitempty"`
}
// Match check if current rule selector match the target resource
// If at least one condition is matched and no other condition failed (could be empty), return true
// Otherwise, return false
func (in *ResourcePolicyRuleSelector) Match(manifest *unstructured.Unstructured) bool {
var compName, compType, oamType, traitType, resourceType, resourceName string
if labels := manifest.GetLabels(); labels != nil {
compName = labels[oam.LabelAppComponent]
compType = labels[oam.WorkloadTypeLabel]
oamType = labels[oam.LabelOAMResourceType]
traitType = labels[oam.TraitTypeLabel]
}
resourceType = manifest.GetKind()
resourceName = manifest.GetName()
match := func(src []string, val string) (found *bool) {
if len(src) == 0 {
return nil
}
return pointer.Bool(val != "" && slices.Contains(src, val))
}
conditions := []*bool{
match(in.CompNames, compName),
match(in.CompTypes, compType),
match(in.OAMResourceTypes, oamType),
match(in.TraitTypes, traitType),
match(in.ResourceTypes, resourceType),
match(in.ResourceNames, resourceName),
}
hasMatched := false
for _, cond := range conditions {
// if any non-empty condition failed, return false
if cond != nil && !*cond {
return false
}
// if condition succeed, record it
if cond != nil && *cond {
hasMatched = true
}
}
// if at least one condition is met, return true
return hasMatched
}
// GarbageCollectStrategy the strategy for target resource to recycle
@@ -84,23 +126,7 @@ const (
// FindStrategy find gc strategy for target resource
func (in GarbageCollectPolicySpec) FindStrategy(manifest *unstructured.Unstructured) *GarbageCollectStrategy {
for _, rule := range in.Rules {
var compName, compType, oamType, traitType string
if labels := manifest.GetLabels(); labels != nil {
compName = labels[oam.LabelAppComponent]
compType = labels[oam.WorkloadTypeLabel]
oamType = labels[oam.LabelOAMResourceType]
traitType = labels[oam.TraitTypeLabel]
}
match := func(src []string, val string) (found bool) {
for _, _val := range src {
found = found || _val == val
}
return val != "" && found
}
if match(rule.Selector.CompNames, compName) ||
match(rule.Selector.CompTypes, compType) ||
match(rule.Selector.OAMResourceTypes, oamType) ||
match(rule.Selector.TraitTypes, traitType) {
if rule.Selector.Match(manifest) {
return &rule.Strategy
}
}

View File

@@ -16,6 +16,8 @@ limitations under the License.
package v1alpha1
import "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
const (
// TopologyPolicyType refers to the type of topology policy
TopologyPolicyType = "topology"
@@ -23,6 +25,8 @@ const (
OverridePolicyType = "override"
// DebugPolicyType refers to the type of debug policy
DebugPolicyType = "debug"
// SharedResourcePolicyType refers to the type of shared resource policy
SharedResourcePolicyType = "shared-resource"
)
// TopologyPolicySpec defines the spec of topology policy
@@ -53,3 +57,23 @@ type OverridePolicySpec struct {
Components []EnvComponentPatch `json:"components,omitempty"`
Selector []string `json:"selector,omitempty"`
}
// SharedResourcePolicySpec defines the spec of shared-resource policy
type SharedResourcePolicySpec struct {
Rules []SharedResourcePolicyRule `json:"rules"`
}
// SharedResourcePolicyRule defines the rule for sharing resources
type SharedResourcePolicyRule struct {
Selector ResourcePolicyRuleSelector `json:"selector"`
}
// FindStrategy return if the target resource should be shared
func (in SharedResourcePolicySpec) FindStrategy(manifest *unstructured.Unstructured) bool {
for _, rule := range in.Rules {
if rule.Selector.Match(manifest) {
return true
}
}
return false
}

View File

@@ -0,0 +1,69 @@
/*
Copyright 2022 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
"testing"
"github.com/stretchr/testify/require"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)
func TestSharedResourcePolicySpec_FindStrategy(t *testing.T) {
testCases := map[string]struct {
rules []SharedResourcePolicyRule
input *unstructured.Unstructured
matched bool
}{
"shared resource rule resourceName match": {
rules: []SharedResourcePolicyRule{{
Selector: ResourcePolicyRuleSelector{ResourceNames: []string{"example"}},
}},
input: &unstructured.Unstructured{Object: map[string]interface{}{
"metadata": map[string]interface{}{
"name": "example",
},
}},
matched: true,
},
"shared resource rule resourceType match": {
rules: []SharedResourcePolicyRule{{
Selector: ResourcePolicyRuleSelector{ResourceTypes: []string{"ConfigMap", "Namespace"}},
}},
input: &unstructured.Unstructured{Object: map[string]interface{}{
"kind": "Namespace",
}},
matched: true,
},
"shared resource rule mismatch": {
rules: []SharedResourcePolicyRule{{
Selector: ResourcePolicyRuleSelector{ResourceNames: []string{"mismatch"}},
}},
input: &unstructured.Unstructured{Object: map[string]interface{}{
"kind": "Namespace",
}},
matched: false,
},
}
for name, tc := range testCases {
t.Run(name, func(t *testing.T) {
r := require.New(t)
spec := SharedResourcePolicySpec{Rules: tc.rules}
r.Equal(tc.matched, spec.FindStrategy(tc.input))
})
}
}

View File

@@ -595,6 +595,11 @@ func (in *RefObjectsComponentSpec) DeepCopyInto(out *RefObjectsComponentSpec) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.URLs != nil {
in, out := &in.URLs, &out.URLs
*out = make([]string, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RefObjectsComponentSpec.
@@ -635,6 +640,11 @@ func (in *ResourcePolicyRuleSelector) DeepCopyInto(out *ResourcePolicyRuleSelect
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.ResourceNames != nil {
in, out := &in.ResourceNames, &out.ResourceNames
*out = make([]string, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePolicyRuleSelector.
@@ -647,6 +657,44 @@ func (in *ResourcePolicyRuleSelector) DeepCopy() *ResourcePolicyRuleSelector {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SharedResourcePolicyRule) DeepCopyInto(out *SharedResourcePolicyRule) {
*out = *in
in.Selector.DeepCopyInto(&out.Selector)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedResourcePolicyRule.
func (in *SharedResourcePolicyRule) DeepCopy() *SharedResourcePolicyRule {
if in == nil {
return nil
}
out := new(SharedResourcePolicyRule)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SharedResourcePolicySpec) DeepCopyInto(out *SharedResourcePolicySpec) {
*out = *in
if in.Rules != nil {
in, out := &in.Rules, &out.Rules
*out = make([]SharedResourcePolicyRule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedResourcePolicySpec.
func (in *SharedResourcePolicySpec) DeepCopy() *SharedResourcePolicySpec {
if in == nil {
return nil
}
out := new(SharedResourcePolicySpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TopologyPolicySpec) DeepCopyInto(out *TopologyPolicySpec) {
*out = *in

View File

@@ -54,8 +54,15 @@ type WorkflowStep common.WorkflowStep
// Workflow defines workflow steps and other attributes
type Workflow struct {
Ref string `json:"ref,omitempty"`
Steps []WorkflowStep `json:"steps,omitempty"`
Ref string `json:"ref,omitempty"`
Mode *WorkflowExecuteMode `json:"mode,omitempty"`
Steps []WorkflowStep `json:"steps,omitempty"`
}
// WorkflowExecuteMode defines the mode of workflow execution
type WorkflowExecuteMode struct {
Steps common.WorkflowMode `json:"steps,omitempty"`
SubSteps common.WorkflowMode `json:"subSteps,omitempty"`
}
// ApplicationSpec is the spec of Application

View File

@@ -120,7 +120,7 @@ type TraitDefinitionSpec struct {
PodDisruptive bool `json:"podDisruptive,omitempty"`
// AppliesToWorkloads specifies the list of workload kinds this trait
// applies to. Workload kinds are specified in kind.group/version format,
// applies to. Workload kinds are specified in resource.group/version format,
// e.g. server.core.oam.dev/v1alpha2. Traits that omit this field apply to
// all workload kinds.
// +optional

View File

@@ -82,6 +82,8 @@ type ManagedResource struct {
Data *runtime.RawExtension `json:"raw,omitempty"`
// Deleted marks the resource to be deleted
Deleted bool `json:"deleted,omitempty"`
// SkipGC marks the resource to skip gc
SkipGC bool `json:"skipGC,omitempty"`
}
// Equal check if two managed resource equals
@@ -121,12 +123,13 @@ func (in ManagedResource) NamespacedName() types.NamespacedName {
// ResourceKey computes the key for managed resource, resources with the same key points to the same resource
func (in ManagedResource) ResourceKey() string {
gv, kind := in.GroupVersionKind().ToAPIVersionAndKind()
group := in.GroupVersionKind().Group
kind := in.GroupVersionKind().Kind
cluster := in.Cluster
if cluster == "" {
cluster = velatypes.ClusterLocalName
}
return strings.Join([]string{gv, kind, cluster, in.Namespace, in.Name}, "/")
return strings.Join([]string{group, kind, cluster, in.Namespace, in.Name}, "/")
}
// ComponentKey computes the key for the component which managed resource belongs to
@@ -215,8 +218,9 @@ func (in *ResourceTracker) ContainsManagedResource(rsc client.Object) bool {
}
// AddManagedResource add object to managed resources, if exists, update
func (in *ResourceTracker) AddManagedResource(rsc client.Object, metaOnly bool, creator common.ResourceCreatorRole) (updated bool) {
func (in *ResourceTracker) AddManagedResource(rsc client.Object, metaOnly bool, skipGC bool, creator common.ResourceCreatorRole) (updated bool) {
mr := newManagedResourceFromResource(rsc)
mr.SkipGC = skipGC
if !metaOnly {
mr.Data = &runtime.RawExtension{Object: rsc}
}

View File

@@ -125,7 +125,7 @@ func TestManagedResourceKeys(t *testing.T) {
},
}
r.Equal("namespace/name", input.NamespacedName().String())
r.Equal("apps/v1/Deployment/cluster/namespace/name", input.ResourceKey())
r.Equal("apps/Deployment/cluster/namespace/name", input.ResourceKey())
r.Equal("env/component", input.ComponentKey())
r.Equal("Deployment name (Cluster: cluster, Namespace: namespace)", input.DisplayName())
var deploy1, deploy2 v12.Deployment
@@ -156,16 +156,16 @@ func TestResourceTracker_ManagedResource(t *testing.T) {
r := require.New(t)
input := &ResourceTracker{}
deploy1 := v12.Deployment{ObjectMeta: v13.ObjectMeta{Name: "deploy1"}}
input.AddManagedResource(&deploy1, true, "")
input.AddManagedResource(&deploy1, true, false, "")
r.Equal(1, len(input.Spec.ManagedResources))
cm2 := v1.ConfigMap{ObjectMeta: v13.ObjectMeta{Name: "cm2"}}
input.AddManagedResource(&cm2, false, "")
input.AddManagedResource(&cm2, false, false, "")
r.Equal(2, len(input.Spec.ManagedResources))
pod3 := v1.Pod{ObjectMeta: v13.ObjectMeta{Name: "pod3"}}
input.AddManagedResource(&pod3, false, "")
input.AddManagedResource(&pod3, false, false, "")
r.Equal(3, len(input.Spec.ManagedResources))
deploy1.Spec.Replicas = pointer.Int32(5)
input.AddManagedResource(&deploy1, false, "")
input.AddManagedResource(&deploy1, false, false, "")
r.Equal(3, len(input.Spec.ManagedResources))
input.DeleteManagedResource(&cm2, false)
r.Equal(3, len(input.Spec.ManagedResources))

View File

@@ -927,6 +927,11 @@ func (in *TraitDefinitionStatus) DeepCopy() *TraitDefinitionStatus {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Workflow) DeepCopyInto(out *Workflow) {
*out = *in
if in.Mode != nil {
in, out := &in.Mode, &out.Mode
*out = new(WorkflowExecuteMode)
**out = **in
}
if in.Steps != nil {
in, out := &in.Steps, &out.Steps
*out = make([]WorkflowStep, len(*in))
@@ -946,9 +951,29 @@ func (in *Workflow) DeepCopy() *Workflow {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkflowExecuteMode) DeepCopyInto(out *WorkflowExecuteMode) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowExecuteMode.
func (in *WorkflowExecuteMode) DeepCopy() *WorkflowExecuteMode {
if in == nil {
return nil
}
out := new(WorkflowExecuteMode)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkflowStep) DeepCopyInto(out *WorkflowStep) {
*out = *in
if in.Meta != nil {
in, out := &in.Meta, &out.Meta
*out = new(common.WorkflowStepMeta)
**out = **in
}
if in.Properties != nil {
in, out := &in.Properties, &out.Properties
*out = new(runtime.RawExtension)

View File

@@ -80,6 +80,8 @@ const (
OpenapiV3JSONSchema string = "openapi-v3-json-schema"
// UISchema is the key to store ui custom schema
UISchema string = "ui-schema"
// VelaQLConfigmapKey is the key to store velaql view
VelaQLConfigmapKey string = "template"
)
// CapabilityCategory defines the category of a capability
@@ -163,6 +165,7 @@ type Capability struct {
Center string `json:"center,omitempty"`
Status string `json:"status,omitempty"`
Description string `json:"description,omitempty"`
Example string `json:"example,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Category CapabilityCategory `json:"category,omitempty"`

View File

@@ -48,6 +48,8 @@ var DefaultKubeVelaNS = "vela-system"
const (
// AnnoDefinitionDescription is the annotation which describe what is the capability used for in a WorkloadDefinition/TraitDefinition Object
AnnoDefinitionDescription = "definition.oam.dev/description"
// AnnoDefinitionExampleURL is the annotation which describe url of usage examples of the capability, it will be loaded in documentation generate.
AnnoDefinitionExampleURL = "definition.oam.dev/example-url"
// AnnoDefinitionAlias is the annotation for definition alias
AnnoDefinitionAlias = "definition.oam.dev/alias"
// AnnoDefinitionIcon is the annotation which describe the icon url
@@ -70,6 +72,8 @@ const (
AnnoIngressControllerHTTPSPort = "ingress.controller/https-port"
// AnnoIngressControllerHTTPPort define ingress controller listen port for http
AnnoIngressControllerHTTPPort = "ingress.controller/http-port"
// AnnoIngressControllerHost define ingress controller externally host
AnnoIngressControllerHost = "ingress.controller/host"
// LabelConfigType is the label for config type
LabelConfigType = "config.oam.dev/type"
// LabelConfigCatalog is the label for config catalog
@@ -102,6 +106,7 @@ type Config map[string]string
type EnvMeta struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Labels string `json:"labels"`
Current string `json:"current"`
}

View File

@@ -93,6 +93,7 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --wai
| `optimize.enableInMemoryWorkflowContext` | Optimize workflow by use in-memory context. | `false` |
| `optimize.disableResourceApplyDoubleCheck` | Optimize workflow by ignoring resource double check after apply. | `false` |
| `optimize.enableResourceTrackerDeleteOnlyTrigger` | Optimize resourcetracker by only trigger reconcile when resourcetracker is deleted. | `true` |
| `featureGates.enableLegacyComponentRevision` | if disabled, only component with rollout trait will create component revisions | `false` |
### MultiCluster parameters

View File

@@ -2198,6 +2198,17 @@ spec:
a context in annotation. - should mark "finish" phase in
status.conditions.'
properties:
mode:
description: WorkflowExecuteMode defines the mode of workflow
execution
properties:
steps:
description: WorkflowMode describes the mode of workflow
type: string
subSteps:
description: WorkflowMode describes the mode of workflow
type: string
type: object
ref:
type: string
steps:
@@ -2225,6 +2236,13 @@ spec:
- parameterKey
type: object
type: array
meta:
description: WorkflowStepMeta contains the meta
data of a workflow step
properties:
alias:
type: string
type: object
name:
description: Name is the unique name of the workflow
step.
@@ -2271,6 +2289,13 @@ spec:
- parameterKey
type: object
type: array
meta:
description: WorkflowStepMeta contains the
meta data of a workflow step
properties:
alias:
type: string
type: object
name:
description: Name is the unique name of the
workflow step.
@@ -2292,6 +2317,8 @@ spec:
properties:
type: object
x-kubernetes-preserve-unknown-fields: true
timeout:
type: string
type:
type: string
required:
@@ -2299,6 +2326,8 @@ spec:
- type
type: object
type: array
timeout:
type: string
type:
type: string
required:
@@ -3621,7 +3650,7 @@ spec:
appliesToWorkloads:
description: AppliesToWorkloads specifies the list of workload
kinds this trait applies to. Workload kinds are specified
in kind.group/version format, e.g. server.core.oam.dev/v1alpha2.
in resource.group/version format, e.g. server.core.oam.dev/v1alpha2.
Traits that omit this field apply to all workload kinds.
items:
type: string
@@ -3973,6 +4002,13 @@ spec:
- parameterKey
type: object
type: array
meta:
description: WorkflowStepMeta contains the meta data of
a workflow step
properties:
alias:
type: string
type: object
name:
description: Name is the unique name of the workflow step.
type: string
@@ -4017,6 +4053,13 @@ spec:
- parameterKey
type: object
type: array
meta:
description: WorkflowStepMeta contains the meta data
of a workflow step
properties:
alias:
type: string
type: object
name:
description: Name is the unique name of the workflow
step.
@@ -4038,6 +4081,8 @@ spec:
properties:
type: object
x-kubernetes-preserve-unknown-fields: true
timeout:
type: string
type:
type: string
required:
@@ -4045,6 +4090,8 @@ spec:
- type
type: object
type: array
timeout:
type: string
type:
type: string
required:

View File

@@ -1009,6 +1009,17 @@ spec:
order, and each step: - will have a context in annotation. - should
mark "finish" phase in status.conditions.'
properties:
mode:
description: WorkflowExecuteMode defines the mode of workflow
execution
properties:
steps:
description: WorkflowMode describes the mode of workflow
type: string
subSteps:
description: WorkflowMode describes the mode of workflow
type: string
type: object
ref:
type: string
steps:
@@ -1035,6 +1046,13 @@ spec:
- parameterKey
type: object
type: array
meta:
description: WorkflowStepMeta contains the meta data of
a workflow step
properties:
alias:
type: string
type: object
name:
description: Name is the unique name of the workflow step.
type: string
@@ -1079,6 +1097,13 @@ spec:
- parameterKey
type: object
type: array
meta:
description: WorkflowStepMeta contains the meta data
of a workflow step
properties:
alias:
type: string
type: object
name:
description: Name is the unique name of the workflow
step.
@@ -1100,6 +1125,8 @@ spec:
properties:
type: object
x-kubernetes-preserve-unknown-fields: true
timeout:
type: string
type:
type: string
required:
@@ -1107,6 +1134,8 @@ spec:
- type
type: object
type: array
timeout:
type: string
type:
type: string
required:

View File

@@ -708,7 +708,7 @@ spec:
appliesToWorkloads:
description: AppliesToWorkloads specifies the list of workload
kinds this trait applies to. Workload kinds are specified
in kind.group/version format, e.g. server.core.oam.dev/v1alpha2.
in resource.group/version format, e.g. server.core.oam.dev/v1alpha2.
Traits that omit this field apply to all workload kinds.
items:
type: string

View File

@@ -105,6 +105,9 @@ spec:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
skipGC:
description: SkipGC marks the resource to skip gc
type: boolean
trait:
type: string
uid:

View File

@@ -356,7 +356,7 @@ spec:
properties:
appliesToWorkloads:
description: AppliesToWorkloads specifies the list of workload kinds
this trait applies to. Workload kinds are specified in kind.group/version
this trait applies to. Workload kinds are specified in resource.group/version
format, e.g. server.core.oam.dev/v1alpha2. Traits that omit this
field apply to all workload kinds.
items:

View File

@@ -57,6 +57,13 @@ spec:
- parameterKey
type: object
type: array
meta:
description: WorkflowStepMeta contains the meta data of a workflow
step
properties:
alias:
type: string
type: object
name:
description: Name is the unique name of the workflow step.
type: string
@@ -100,6 +107,13 @@ spec:
- parameterKey
type: object
type: array
meta:
description: WorkflowStepMeta contains the meta data of a
workflow step
properties:
alias:
type: string
type: object
name:
description: Name is the unique name of the workflow step.
type: string
@@ -119,6 +133,8 @@ spec:
properties:
type: object
x-kubernetes-preserve-unknown-fields: true
timeout:
type: string
type:
type: string
required:
@@ -126,6 +142,8 @@ spec:
- type
type: object
type: array
timeout:
type: string
type:
type: string
required:
@@ -141,6 +159,16 @@ spec:
openAPIV3Schema:
description: Workflow defines workflow steps and other attributes
properties:
mode:
description: WorkflowExecuteMode defines the mode of workflow execution
properties:
steps:
description: WorkflowMode describes the mode of workflow
type: string
subSteps:
description: WorkflowMode describes the mode of workflow
type: string
type: object
ref:
type: string
steps:
@@ -166,6 +194,13 @@ spec:
- parameterKey
type: object
type: array
meta:
description: WorkflowStepMeta contains the meta data of a workflow
step
properties:
alias:
type: string
type: object
name:
description: Name is the unique name of the workflow step.
type: string
@@ -209,6 +244,13 @@ spec:
- parameterKey
type: object
type: array
meta:
description: WorkflowStepMeta contains the meta data of a
workflow step
properties:
alias:
type: string
type: object
name:
description: Name is the unique name of the workflow step.
type: string
@@ -228,6 +270,8 @@ spec:
properties:
type: object
x-kubernetes-preserve-unknown-fields: true
timeout:
type: string
type:
type: string
required:
@@ -235,6 +279,8 @@ spec:
- type
type: object
type: array
timeout:
type: string
type:
type: string
required:

View File

@@ -11,7 +11,10 @@ metadata:
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- '*'
- deployments.apps
- statefulsets.apps
- daemonsets.apps
- jobs.batch
podDisruptive: true
schematic:
cue:

View File

@@ -4,9 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Add annotations on K8s pod for your workload which follows the pod spec in path 'spec.template'.
labels:
custom.definition.oam.dev/ui-hidden: "true"
definition.oam.dev/description: Add annotations on your workload. if it generates pod, add same annotations for generated pods.
name: annotations
namespace: {{ include "systemDefinitionNamespace" . }}
spec:

View File

@@ -6,6 +6,7 @@ metadata:
annotations:
definition.oam.dev/description: Apply components of an application in parallel for your workflow steps
labels:
custom.definition.oam.dev/deprecated: "true"
custom.definition.oam.dev/ui-hidden: "true"
name: apply-application-in-parallel
namespace: {{ include "systemDefinitionNamespace" . }}

View File

@@ -4,8 +4,9 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
definition.oam.dev/description: Apply application for your workflow steps
definition.oam.dev/description: Apply application for your workflow steps, it has no arguments, should be used for custom steps before or after application applied.
labels:
custom.definition.oam.dev/deprecated: "true"
custom.definition.oam.dev/ui-hidden: "true"
name: apply-application
namespace: {{ include "systemDefinitionNamespace" . }}

View File

@@ -22,9 +22,9 @@ spec:
cluster: parameter.cluster
}
parameter: {
// +usage=Specify the value of the object
// +usage=Specify Kubernetes native resource object to be applied
value: {...}
// +usage=Specify the cluster of the object
// +usage=The cluster you want to apply the resource to, default is the current control plane cluster
cluster: *"" | string
}

View File

@@ -0,0 +1,44 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/apply-once.cue
apiVersion: core.oam.dev/v1beta1
kind: PolicyDefinition
metadata:
annotations:
definition.oam.dev/description: Allow configuration drift for applied resources, delivery the resource without continuously reconciliation.
name: apply-once
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
schematic:
cue:
template: |
#ApplyOnceStrategy: {
// +usage=Specify the path of the resource that allow configuration drift
path: [...string]
}
#ApplyOncePolicyRule: {
// +usage=Specify how to select the targets of the rule
selector?: #ResourcePolicyRuleSelector
// +usage=Specify the strategy for configuring the resource level configuration drift behaviour
strategy: #ApplyOnceStrategy
}
#ResourcePolicyRuleSelector: {
// +usage=Select resources by component names
componentNames?: [...string]
// +usage=Select resources by component types
componentTypes?: [...string]
// +usage=Select resources by oamTypes (COMPONENT or TRAIT)
oamTypes?: [...string]
// +usage=Select resources by trait types
traitTypes?: [...string]
// +usage=Select resources by resource types (like Deployment)
resourceTypes?: [...string]
// +usage=Select resources by their names
resourceNames?: [...string]
}
parameter: {
// +usage=Whether to enable apply-once for the whole application
enable: *false | bool
// +usage=Specify the rules for configuring apply-once policy in resource level
rules?: [...#ApplyOncePolicyRule]
}

View File

@@ -6,6 +6,7 @@ metadata:
annotations:
definition.oam.dev/description: Apply remaining components and traits
labels:
custom.definition.oam.dev/deprecated: "true"
custom.definition.oam.dev/ui-hidden: "true"
name: apply-remaining
namespace: {{ include "systemDefinitionNamespace" . }}

View File

@@ -5,13 +5,14 @@ kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Add command on K8s pod for your workload which follows the pod spec in path 'spec.template'
labels:
custom.definition.oam.dev/ui-hidden: "true"
name: command
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- '*'
- deployments.apps
- statefulsets.apps
- daemonsets.apps
- jobs.batch
schematic:
cue:
template: |

View File

@@ -4,13 +4,13 @@ apiVersion: core.oam.dev/v1beta1
kind: ComponentDefinition
metadata:
annotations:
custom.definition.oam.dev/alias.config.oam.dev: Image Registry
alias.config.oam.dev: Image Registry
definition.oam.dev/description: Config information to authenticate image registry
labels:
custom.definition.oam.dev/catalog.config.oam.dev: velacore-config
custom.definition.oam.dev/multi-cluster.config.oam.dev: "true"
custom.definition.oam.dev/type.config.oam.dev: image-registry
catalog.config.oam.dev: velacore-config
custom.definition.oam.dev/ui-hidden: "true"
multi-cluster.config.oam.dev: "true"
type.config.oam.dev: image-registry
name: config-image-registry
namespace: {{ include "systemDefinitionNamespace" . }}
spec:

View File

@@ -5,13 +5,14 @@ kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Set the image of the container.
labels:
custom.definition.oam.dev/ui-hidden: "true"
name: container-image
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- '*'
- deployments.apps
- statefulsets.apps
- daemonsets.apps
- jobs.batch
podDisruptive: true
schematic:
cue:

View File

@@ -5,13 +5,12 @@ kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Automatically scale the component based on CPU usage.
labels:
custom.definition.oam.dev/ui-hidden: "true"
name: cpuscaler
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- deployments.apps
- statefulsets.apps
schematic:
cue:
template: |

View File

@@ -0,0 +1,574 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/daemon.cue
apiVersion: core.oam.dev/v1beta1
kind: ComponentDefinition
metadata:
annotations:
definition.oam.dev/description: Describes daemonset services in Kubernetes.
name: daemon
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
schematic:
cue:
template: |
import (
"strconv"
)
mountsArray: {
pvc: *[
for v in parameter.volumeMounts.pvc {
{
mountPath: v.mountPath
name: v.name
}
},
] | []
configMap: *[
for v in parameter.volumeMounts.configMap {
{
mountPath: v.mountPath
name: v.name
}
},
] | []
secret: *[
for v in parameter.volumeMounts.secret {
{
mountPath: v.mountPath
name: v.name
}
},
] | []
emptyDir: *[
for v in parameter.volumeMounts.emptyDir {
{
mountPath: v.mountPath
name: v.name
}
},
] | []
hostPath: *[
for v in parameter.volumeMounts.hostPath {
{
mountPath: v.mountPath
if v.mountPropagation != _|_ {
mountPropagation: v.mountPropagation
}
name: v.name
if v.readOnly != _|_ {
readOnly: v.readOnly
}
}
},
] | []
}
volumesArray: {
pvc: *[
for v in parameter.volumeMounts.pvc {
{
name: v.name
persistentVolumeClaim: claimName: v.claimName
}
},
] | []
configMap: *[
for v in parameter.volumeMounts.configMap {
{
name: v.name
configMap: {
defaultMode: v.defaultMode
name: v.cmName
if v.items != _|_ {
items: v.items
}
}
}
},
] | []
secret: *[
for v in parameter.volumeMounts.secret {
{
name: v.name
secret: {
defaultMode: v.defaultMode
secretName: v.secretName
if v.items != _|_ {
items: v.items
}
}
}
},
] | []
emptyDir: *[
for v in parameter.volumeMounts.emptyDir {
{
name: v.name
emptyDir: medium: v.medium
}
},
] | []
hostPath: *[
for v in parameter.volumeMounts.hostPath {
{
name: v.name
hostPath: path: v.path
}
},
] | []
}
output: {
apiVersion: "apps/v1"
kind: "DaemonSet"
spec: {
selector: matchLabels: "app.oam.dev/component": context.name
template: {
metadata: {
labels: {
if parameter.labels != _|_ {
parameter.labels
}
if parameter.addRevisionLabel {
"app.oam.dev/revision": context.revision
}
"app.oam.dev/name": context.appName
"app.oam.dev/component": context.name
}
if parameter.annotations != _|_ {
annotations: parameter.annotations
}
}
spec: {
containers: [{
name: context.name
image: parameter.image
if parameter["port"] != _|_ && parameter["ports"] == _|_ {
ports: [{
containerPort: parameter.port
}]
}
if parameter["ports"] != _|_ {
ports: [ for v in parameter.ports {
{
containerPort: v.port
protocol: v.protocol
if v.name != _|_ {
name: v.name
}
if v.name == _|_ {
name: "port-" + strconv.FormatInt(v.port, 10)
}
}}]
}
if parameter["imagePullPolicy"] != _|_ {
imagePullPolicy: parameter.imagePullPolicy
}
if parameter["cmd"] != _|_ {
command: parameter.cmd
}
if parameter["env"] != _|_ {
env: parameter.env
}
if context["config"] != _|_ {
env: context.config
}
if parameter["cpu"] != _|_ {
resources: {
limits: cpu: parameter.cpu
requests: cpu: parameter.cpu
}
}
if parameter["memory"] != _|_ {
resources: {
limits: memory: parameter.memory
requests: memory: parameter.memory
}
}
if parameter["volumes"] != _|_ && parameter["volumeMounts"] == _|_ {
volumeMounts: [ for v in parameter.volumes {
{
mountPath: v.mountPath
name: v.name
}}]
}
if parameter["volumeMounts"] != _|_ {
volumeMounts: mountsArray.pvc + mountsArray.configMap + mountsArray.secret + mountsArray.emptyDir + mountsArray.hostPath
}
if parameter["livenessProbe"] != _|_ {
livenessProbe: parameter.livenessProbe
}
if parameter["readinessProbe"] != _|_ {
readinessProbe: parameter.readinessProbe
}
}]
if parameter["hostAliases"] != _|_ {
// +patchKey=ip
hostAliases: parameter.hostAliases
}
if parameter["imagePullSecrets"] != _|_ {
imagePullSecrets: [ for v in parameter.imagePullSecrets {
name: v
},
]
}
if parameter["volumes"] != _|_ && parameter["volumeMounts"] == _|_ {
volumes: [ for v in parameter.volumes {
{
name: v.name
if v.type == "pvc" {
persistentVolumeClaim: claimName: v.claimName
}
if v.type == "configMap" {
configMap: {
defaultMode: v.defaultMode
name: v.cmName
if v.items != _|_ {
items: v.items
}
}
}
if v.type == "secret" {
secret: {
defaultMode: v.defaultMode
secretName: v.secretName
if v.items != _|_ {
items: v.items
}
}
}
if v.type == "emptyDir" {
emptyDir: medium: v.medium
}
}
}]
}
if parameter["volumeMounts"] != _|_ {
volumes: volumesArray.pvc + volumesArray.configMap + volumesArray.secret + volumesArray.emptyDir + volumesArray.hostPath
}
}
}
}
}
exposePorts: [
for v in parameter.ports if v.expose == true {
port: v.port
targetPort: v.port
if v.name != _|_ {
name: v.name
}
if v.name == _|_ {
name: "port-" + strconv.FormatInt(v.port, 10)
}
},
]
outputs: {
if len(exposePorts) != 0 {
webserviceExpose: {
apiVersion: "v1"
kind: "Service"
metadata: name: context.name
spec: {
selector: "app.oam.dev/component": context.name
ports: exposePorts
type: parameter.exposeType
}
}
}
}
parameter: {
// +usage=Specify the labels in the workload
labels?: [string]: string
// +usage=Specify the annotations in the workload
annotations?: [string]: string
// +usage=Which image would you like to use for your service
// +short=i
image: string
// +usage=Specify image pull policy for your service
imagePullPolicy?: "Always" | "Never" | "IfNotPresent"
// +usage=Specify image pull secrets for your service
imagePullSecrets?: [...string]
// +ignore
// +usage=Deprecated field, please use ports instead
// +short=p
port?: int
// +usage=Which ports do you want customer traffic sent to, defaults to 80
ports?: [...{
// +usage=Number of port to expose on the pod's IP address
port: int
// +usage=Name of the port
name?: string
// +usage=Protocol for port. Must be UDP, TCP, or SCTP
protocol: *"TCP" | "UDP" | "SCTP"
// +usage=Specify if the port should be exposed
expose: *false | bool
}]
// +ignore
// +usage=Specify what kind of Service you want. options: "ClusterIP", "NodePort", "LoadBalancer", "ExternalName"
exposeType: *"ClusterIP" | "NodePort" | "LoadBalancer" | "ExternalName"
// +ignore
// +usage=If addRevisionLabel is true, the revision label will be added to the underlying pods
addRevisionLabel: *false | bool
// +usage=Commands to run in the container
cmd?: [...string]
// +usage=Define arguments by using environment variables
env?: [...{
// +usage=Environment variable name
name: string
// +usage=The value of the environment variable
value?: string
// +usage=Specifies a source the value of this var should come from
valueFrom?: {
// +usage=Selects a key of a secret in the pod's namespace
secretKeyRef?: {
// +usage=The name of the secret in the pod's namespace to select from
name: string
// +usage=The key of the secret to select from. Must be a valid secret key
key: string
}
// +usage=Selects a key of a config map in the pod's namespace
configMapKeyRef?: {
// +usage=The name of the config map in the pod's namespace to select from
name: string
// +usage=The key of the config map to select from. Must be a valid secret key
key: string
}
}
}]
// +usage=Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core)
cpu?: string
// +usage=Specifies the attributes of the memory resource required for the container.
memory?: string
volumeMounts?: {
// +usage=Mount PVC type volume
pvc?: [...{
name: string
mountPath: string
// +usage=The name of the PVC
claimName: string
}]
// +usage=Mount ConfigMap type volume
configMap?: [...{
name: string
mountPath: string
defaultMode: *420 | int
cmName: string
items?: [...{
key: string
path: string
mode: *511 | int
}]
}]
// +usage=Mount Secret type volume
secret?: [...{
name: string
mountPath: string
defaultMode: *420 | int
secretName: string
items?: [...{
key: string
path: string
mode: *511 | int
}]
}]
// +usage=Mount EmptyDir type volume
emptyDir?: [...{
name: string
mountPath: string
medium: *"" | "Memory"
}]
// +usage=Mount HostPath type volume
hostPath?: [...{
name: string
mountPath: string
mountPropagation?: "None" | "HostToContainer" | "Bidirectional"
path: string
readOnly?: bool
}]
}
// +usage=Deprecated field, use volumeMounts instead.
volumes?: [...{
name: string
mountPath: string
// +usage=Specify volume type, options: "pvc","configMap","secret","emptyDir"
type: "pvc" | "configMap" | "secret" | "emptyDir"
if type == "pvc" {
claimName: string
}
if type == "configMap" {
defaultMode: *420 | int
cmName: string
items?: [...{
key: string
path: string
mode: *511 | int
}]
}
if type == "secret" {
defaultMode: *420 | int
secretName: string
items?: [...{
key: string
path: string
mode: *511 | int
}]
}
if type == "emptyDir" {
medium: *"" | "Memory"
}
}]
// +usage=Instructions for assessing whether the container is alive.
livenessProbe?: #HealthProbe
// +usage=Instructions for assessing whether the container is in a suitable state to serve traffic.
readinessProbe?: #HealthProbe
// +usage=Specify the hostAliases to add
hostAliases?: [...{
ip: string
hostnames: [...string]
}]
}
#HealthProbe: {
// +usage=Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute.
exec?: {
// +usage=A command to be executed inside the container to assess its health. Each space delimited token of the command is a separate array element. Commands exiting 0 are considered to be successful probes, whilst all other exit codes are considered failures.
command: [...string]
}
// +usage=Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute.
httpGet?: {
// +usage=The endpoint, relative to the port, to which the HTTP GET request should be directed.
path: string
// +usage=The TCP socket within the container to which the HTTP GET request should be directed.
port: int
host?: string
scheme?: *"HTTP" | string
httpHeaders?: [...{
name: string
value: string
}]
}
// +usage=Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute.
tcpSocket?: {
// +usage=The TCP socket within the container that should be probed to assess container health.
port: int
}
// +usage=Number of seconds after the container is started before the first probe is initiated.
initialDelaySeconds: *0 | int
// +usage=How often, in seconds, to execute the probe.
periodSeconds: *10 | int
// +usage=Number of seconds after which the probe times out.
timeoutSeconds: *1 | int
// +usage=Minimum consecutive successes for the probe to be considered successful after having failed.
successThreshold: *1 | int
// +usage=Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe).
failureThreshold: *3 | int
}
status:
customStatus: |-
ready: {
replicas: *0 | int
} & {
if context.output.status.numberReady != _|_ {
replicas: context.output.status.numberReady
}
}
desired: {
replicas: *0 | int
} & {
if context.output.status.desiredNumberScheduled != _|_ {
replicas: context.output.status.desiredNumberScheduled
}
}
message: "Ready:\(ready.replicas)/\(desired.replicas)"
healthPolicy: |-
ready: {
replicas: *0 | int
} & {
if context.output.status.numberReady != _|_ {
replicas: context.output.status.numberReady
}
}
desired: {
replicas: *0 | int
} & {
if context.output.status.desiredNumberScheduled != _|_ {
replicas: context.output.status.desiredNumberScheduled
}
}
current: {
replicas: *0 | int
} & {
if context.output.status.currentNumberScheduled != _|_ {
replicas: context.output.status.currentNumberScheduled
}
}
updated: {
replicas: *0 | int
} & {
if context.output.status.updatedNumberScheduled != _|_ {
replicas: context.output.status.updatedNumberScheduled
}
}
generation: {
metadata: context.output.metadata.generation
observed: *0 | int
} & {
if context.output.status.observedGeneration != _|_ {
observed: context.output.status.observedGeneration
}
}
isHealth: (desired.replicas == ready.replicas) && (desired.replicas == updated.replicas) && (desired.replicas == current.replicas) && (generation.observed == generation.metadata || generation.observed > generation.metadata)
workload:
definition:
apiVersion: apps/v1
kind: DaemonSet
type: daemonsets.apps

View File

@@ -4,7 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
definition.oam.dev/description: check or install depends-on Application
definition.oam.dev/description: Wait for the specified Application to complete.
labels:
custom.definition.oam.dev/ui-hidden: "true"
name: depends-on-app

View File

@@ -4,7 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
definition.oam.dev/description: Deploy cloud resource and bind secret to clusters
definition.oam.dev/description: Deploy cloud resource and deliver secret to multi clusters.
name: deploy-cloud-resource
namespace: {{ include "systemDefinitionNamespace" . }}
spec:

View File

@@ -4,7 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
definition.oam.dev/description: Deploy components with policies.
definition.oam.dev/description: A powerful and unified deploy step for components multi-cluster delivery with policies.
name: deploy
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
@@ -21,9 +21,9 @@ spec:
ignoreTerraformComponent: parameter.ignoreTerraformComponent
}
parameter: {
//+usage=If set false, the workflow will be suspend before this step.
//+usage=If set to false, the workflow will suspend automatically before this step, default to be true.
auto: *true | bool
//+usage=Declare the policies used for this step.
//+usage=Declare the policies that used for this deployment. If not specified, the components will be deployed to the hub cluster.
policies?: [...string]
//+usage=Maximum number of concurrent delivered components.
parallelism: *5 | int

View File

@@ -6,6 +6,7 @@ metadata:
annotations:
definition.oam.dev/description: Deploy env binding component to target env
labels:
custom.definition.oam.dev/deprecated: "true"
custom.definition.oam.dev/ui-hidden: "true"
name: deploy2env
namespace: {{ include "systemDefinitionNamespace" . }}

View File

@@ -6,6 +6,7 @@ metadata:
annotations:
definition.oam.dev/description: Deploy application to runtime clusters
labels:
custom.definition.oam.dev/deprecated: "true"
custom.definition.oam.dev/ui-hidden: "true"
name: deploy2runtime
namespace: {{ include "systemDefinitionNamespace" . }}

View File

@@ -5,13 +5,14 @@ kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Add env on K8s pod for your workload which follows the pod spec in path 'spec.template'
labels:
custom.definition.oam.dev/ui-hidden: "true"
name: env
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- '*'
- deployments.apps
- statefulsets.apps
- daemonsets.apps
- jobs.batch
schematic:
cue:
template: |

View File

@@ -22,7 +22,7 @@ spec:
traits?: [...{
type: string
properties?: {...}
// +usage=Specify if the trait shoued be remove, default false
// +usage=Specify if the trait should be remove, default false
disable: *false | bool
}]
}

View File

@@ -4,7 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
definition.oam.dev/description: Export data to config map for your workflow steps
definition.oam.dev/description: Export data to specified Kubernetes ConfigMap in your workflow.
labels:
custom.definition.oam.dev/ui-hidden: "true"
name: export2config

View File

@@ -4,7 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
definition.oam.dev/description: Export data to secret for your workflow steps
definition.oam.dev/description: Export data to Kubernetes Secret in your workflow.
labels:
custom.definition.oam.dev/ui-hidden: "true"
name: export2secret
@@ -46,7 +46,7 @@ spec:
type?: string
// +usage=Specify the data of secret
data: {}
// +usage=Specify the cluster of the config map
// +usage=Specify the cluster of the secret
cluster: *"" | string
}

View File

@@ -5,23 +5,30 @@ kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Expose port to enable web traffic for your component.
labels:
custom.definition.oam.dev/ui-hidden: "true"
name: expose
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- deployments.apps
- statefulsets.apps
podDisruptive: false
schematic:
cue:
template: |
import (
"strconv"
)
outputs: service: {
apiVersion: "v1"
kind: "Service"
metadata: name: context.name
metadata: name: context.name
metadata: annotations: parameter.annotations
spec: {
selector: "app.oam.dev/component": context.name
ports: [
for p in parameter.port {
name: "port-" + strconv.FormatInt(p, 10)
port: p
targetPort: p
},
@@ -32,7 +39,33 @@ spec:
parameter: {
// +usage=Specify the exposion ports
port: [...int]
// +usage=Specify the annotaions of the exposed service
annotations: [string]: string
// +usage=Specify what kind of Service you want. options: "ClusterIP","NodePort","LoadBalancer","ExternalName"
type: *"ClusterIP" | "NodePort" | "LoadBalancer" | "ExternalName"
}
status:
customStatus: |-
message: *"" | string
service: context.outputs.service
if service.spec.type == "ClusterIP" {
message: "ClusterIP: \(service.spec.clusterIP)"
}
if service.spec.type == "LoadBalancer" {
status: service.status
isHealth: status != _|_ && status.loadBalancer != _|_ && status.loadBalancer.ingress != _|_ && len(status.loadBalancer.ingress) > 0
if !isHealth {
message: "ExternalIP: Pending"
}
if isHealth {
message: "ExternalIP: \(status.loadBalancer.ingress[0].ip)"
}
}
healthPolicy: |-
isHealth: *true | bool
service: context.outputs.service
if service.spec.type == "LoadBalancer" {
status: service.status
isHealth: status != _|_ && status.loadBalancer != _|_ && status.loadBalancer.ingress != _|_ && len(status.loadBalancer.ingress) > 0
}

View File

@@ -0,0 +1,40 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/garbage-collect.cue
apiVersion: core.oam.dev/v1beta1
kind: PolicyDefinition
metadata:
annotations:
definition.oam.dev/description: Configure the garbage collect behaviour for the application.
name: garbage-collect
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
schematic:
cue:
template: |
#GarbageCollectPolicyRule: {
// +usage=Specify how to select the targets of the rule
selector: [...#ResourcePolicyRuleSelector]
// +usage=Specify the strategy for target resource to recycle
strategy: *"onAppUpdate" | "onAppDelete" | "never"
}
#ResourcePolicyRuleSelector: {
// +usage=Select resources by component names
componentNames?: [...string]
// +usage=Select resources by component types
componentTypes?: [...string]
// +usage=Select resources by oamTypes (COMPONENT or TRAIT)
oamTypes?: [...string]
// +usage=Select resources by trait types
traitTypes?: [...string]
// +usage=Select resources by resource types (like Deployment)
resourceTypes?: [...string]
// +usage=Select resources by their names
resourceNames?: [...string]
}
parameter: {
// +usage=If is set, outdated versioned resourcetracker will not be recycled automatically, outdated resources will be kept until resourcetracker be deleted manually
keepLegacyResource: *false | bool
// +usage=Specify the list of rules to control gc strategy at resource level, if one resource is controlled by multiple rules, first rule will be used
rules?: [...#GarbageCollectPolicyRule]
}

View File

@@ -9,7 +9,8 @@ metadata:
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- '*'
- deployments.apps
- statefulsets.apps
podDisruptive: false
schematic:
cue:
@@ -38,6 +39,9 @@ spec:
if !parameter.classInSpec {
"kubernetes.io/ingress.class": parameter.class
}
if parameter.gatewayHost != _|_ {
"ingress.controller/host": parameter.gatewayHost
}
}
}
spec: {
@@ -82,8 +86,11 @@ spec:
// +usage=Set ingress class in '.spec.ingressClassName' instead of 'kubernetes.io/ingress.class' annotation.
classInSpec: *false | bool
// +usage=Specify the secret name you want to quote.
// +usage=Specify the secret name you want to quote to use tls.
secretName?: string
// +usage=Specify the host of the ingress gateway, which is used to generate the endpoints when the host is empty.
gatewayHost?: string
}
status:
customStatus: |-
@@ -97,7 +104,7 @@ spec:
message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host + ", IP: " + igs[0].ip
}
if igs[0].host == _|_ {
message: "Host not specified, visit the cluster or load balancer in front of the cluster"
message: "Host not specified, visit the cluster or load balancer in front of the cluster with IP: " + igs[0].ip
}
}
if igs[0].ip == _|_ {

View File

@@ -5,13 +5,14 @@ kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Add host aliases on K8s pod for your workload which follows the pod spec in path 'spec.template'.
labels:
custom.definition.oam.dev/ui-hidden: "true"
name: hostalias
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- '*'
- deployments.apps
- statefulsets.apps
- daemonsets.apps
- jobs.batch
podDisruptive: false
schematic:
cue:

View File

@@ -1,41 +0,0 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/import-grafana-dashboard.cue
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Import dashboards to Grafana
labels:
custom.definition.oam.dev/ui-hidden: "true"
name: import-grafana-dashboard
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads: []
conflictsWith: []
podDisruptive: false
schematic:
cue:
template: |
outputs: registerdatasource: {
apiVersion: "grafana.extension.oam.dev/v1alpha1"
kind: "ImportDashboard"
spec: {
grafana: {
service: parameter.grafanaServiceName
namespace: parameter.grafanaServiceNamespace
credentialSecret: parameter.credentialSecret
credentialSecretNamespace: parameter.credentialSecretNamespace
}
urls: parameter.urls
}
}
parameter: {
grafanaServiceName: string
grafanaServiceNamespace: *"default" | string
credentialSecret: string
credentialSecretNamespace: *"default" | string
urls: [...string]
}
workloadRefPath: ""

View File

@@ -5,13 +5,14 @@ kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: add an init container and use shared volume with pod
labels:
custom.definition.oam.dev/ui-hidden: "true"
name: init-container
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- deployments.apps
- statefulsets.apps
- daemonsets.apps
- jobs.batch
podDisruptive: true
schematic:
cue:
@@ -27,8 +28,9 @@ spec:
}]
}]
initContainers: [{
name: parameter.name
image: parameter.image
name: parameter.name
image: parameter.image
imagePullPolicy: parameter.imagePullPolicy
if parameter.cmd != _|_ {
command: parameter.cmd
}
@@ -58,6 +60,9 @@ spec:
// +usage=Specify the image of init container
image: string
// +usage=Specify image pull policy for your service
imagePullPolicy: *"IfNotPresent" | "Always" | "Never"
// +usage=Specify the commands run in the init container
cmd?: [...string]

View File

@@ -4,9 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Add labels on K8s pod for your workload which follows the pod spec in path 'spec.template'.
labels:
custom.definition.oam.dev/ui-hidden: "true"
definition.oam.dev/description: Add labels on your workload. if it generates pod, add same label for generated pods.
name: labels
namespace: {{ include "systemDefinitionNamespace" . }}
spec:

View File

@@ -5,13 +5,14 @@ kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Add lifecycle hooks for every container of K8s pod for your workload which follows the pod spec in path 'spec.template'.
labels:
custom.definition.oam.dev/ui-hidden: "true"
name: lifecycle
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- '*'
- deployments.apps
- statefulsets.apps
- daemonsets.apps
- jobs.batch
podDisruptive: true
schematic:
cue:

View File

@@ -11,7 +11,10 @@ metadata:
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- '*'
- deployments.apps
- statefulsets.apps
- daemonsets.apps
- jobs.batch
podDisruptive: true
schematic:
cue:

View File

@@ -4,7 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
definition.oam.dev/description: Send message to webhook
definition.oam.dev/description: Send notifications to Email, DingTalk, Slack, Lark or webhook in your workflow.
name: notification
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
@@ -17,9 +17,11 @@ spec:
)
parameter: {
// +usage=Please fulfill its url and message if you want to send Lark messages
lark?: {
// +usage=Specify the the lark url, you can either sepcify it in value or use secretRef
url: {
// +usage=the url address content in string
value: string
} | {
secretRef: {
@@ -29,7 +31,7 @@ spec:
key: string
}
}
// +useage=Specify the message that you want to sent
// +usage=Specify the message that you want to sent, refer to [Lark messaging](https://open.feishu.cn/document/ukTMukTMukTM/ucTM5YjL3ETO24yNxkjN#8b0f2a1b).
message: {
// +usage=msg_type can be text, post, image, interactive, share_chat, share_user, audio, media, file, sticker
msg_type: string
@@ -37,10 +39,11 @@ spec:
content: string
}
}
// +usage=Please fulfill its url and message if you want to send DingTalk messages
dingding?: {
// +usage=Specify the the dingding url, you can either sepcify it in value or use secretRef
url: {
// +usage=the url address content in string
value: string
} | {
secretRef: {
@@ -50,8 +53,9 @@ spec:
key: string
}
}
// +useage=Specify the message that you want to sent
// +usage=Specify the message that you want to sent, refer to [dingtalk messaging](https://developers.dingtalk.com/document/robots/custom-robot-access/title-72m-8ag-pqw)
message: {
// +usage=Specify the message content of dingtalk notification
text?: *null | {
content: string
}
@@ -93,10 +97,11 @@ spec:
}
}
}
// +usage=Please fulfill its url and message if you want to send Slack messages
slack?: {
// +usage=Specify the the slack url, you can either sepcify it in value or use secretRef
url: {
// +usage=the url address content in string
value: string
} | {
secretRef: {
@@ -106,8 +111,9 @@ spec:
key: string
}
}
// +useage=Specify the message that you want to sent
// +usage=Specify the message that you want to sent, refer to [slack messaging](https://api.slack.com/reference/messaging/payload)
message: {
// +usage=Specify the message text for slack notification
text: string
blocks?: *null | [...block]
attachments?: *null | {
@@ -115,10 +121,11 @@ spec:
color?: string
}
thread_ts?: string
mrkdwn?: *true | bool
// +usage=Specify the message text format in markdown for slack notification
mrkdwn?: *true | bool
}
}
// +usage=Please fulfill its from, to and content if you want to send email
email?: {
// +usage=Specify the email info that you want to send from
from: {
@@ -128,6 +135,7 @@ spec:
alias?: string
// +usage=Specify the password of the email, you can either sepcify it in value or use secretRef
password: {
// +usage=the password content in string
value: string
} | {
secretRef: {

View File

@@ -4,7 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: PolicyDefinition
metadata:
annotations:
definition.oam.dev/description: Override configuration when deploying resources
definition.oam.dev/description: Describe the configuration to override when deploying resources, it only works with specified `deploy` step in workflow.
name: override
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
@@ -16,11 +16,15 @@ spec:
name?: string
// +usage=Specify the type of the patch component.
type?: string
// +usage=Specify the properties to override.
properties?: {...}
// +usage=Specify the traits to override.
traits?: [...{
// +usage=Specify the type of the trait to be patched.
type: string
// +usage=Specify the properties to override.
properties?: {...}
// +usage=Specify if the trait shoued be remove, default false
// +usage=Specify if the trait should be remove, default false
disable: *false | bool
}]
}

View File

@@ -6,11 +6,13 @@ metadata:
annotations:
definition.oam.dev/description: Enable public web traffic for the component without creating a Service.
labels:
custom.definition.oam.dev/deprecated: "true"
custom.definition.oam.dev/ui-hidden: "true"
name: pure-ingress
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads: []
appliesToWorkloads:
- '*'
conflictsWith: []
podDisruptive: false
schematic:

View File

@@ -4,7 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
definition.oam.dev/description: Read objects for your workflow steps
definition.oam.dev/description: Read Kubernetes objects from cluster for your workflow steps
labels:
custom.definition.oam.dev/ui-hidden: "true"
name: read-object
@@ -50,15 +50,15 @@ spec:
}
}
parameter: {
// +usage=Specify the apiVersion of the object, defaults to core.oam.dev/v1beta1
// +usage=Specify the apiVersion of the object, defaults to 'core.oam.dev/v1beta1'
apiVersion?: string
// +usage=Specify the kind of the object, defaults to Application
kind?: string
// +usage=Specify the name of the object
name: string
// +usage=Specify the namespace of the object
namespace?: string
// +usage=Specify the cluster of the object
// +usage=The namespace of the resource you want to read
namespace?: *"default" | string
// +usage=The cluster you want to apply the resource to, default is the current control plane cluster
cluster: *"" | string
}

View File

@@ -28,7 +28,12 @@ spec:
labelSelector?: [string]: string
...
}
output: parameter.objects[0]
output: {
if len(parameter.objects) > 0 {
parameter.objects[0]
}
...
}
outputs: {
for i, v in parameter.objects {
if i > 0 {

View File

@@ -1,50 +0,0 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/register-grafana-datasource.cue
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Add a datasource to Grafana
labels:
custom.definition.oam.dev/ui-hidden: "true"
name: register-grafana-datasource
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads: []
conflictsWith: []
podDisruptive: false
schematic:
cue:
template: |
outputs: registerdatasource: {
apiVersion: "grafana.extension.oam.dev/v1alpha1"
kind: "DatasourceRegistration"
spec: {
grafana: {
service: parameter.grafanaServiceName
namespace: parameter.grafanaServiceNamespace
credentialSecret: parameter.credentialSecret
credentialSecretNamespace: parameter.credentialSecretNamespace
}
datasource: {
name: parameter.name
type: parameter.type
access: parameter.access
service: parameter.service
namespace: parameter.namespace
}
}
}
parameter: {
grafanaServiceName: string
grafanaServiceNamespace: *"default" | string
credentialSecret: string
credentialSecretNamespace: string
name: string
type: string
access: *"proxy" | string
service: string
namespace: *"default" | string
}
workloadRefPath: ""

View File

@@ -5,13 +5,14 @@ kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Add resource requests and limits on K8s pod for your workload which follows the pod spec in path 'spec.template.'
labels:
custom.definition.oam.dev/ui-hidden: "true"
name: resource
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- '*'
- deployments.apps
- statefulsets.apps
- daemonsets.apps
- jobs.batch
podDisruptive: true
schematic:
cue:

View File

@@ -9,7 +9,8 @@ metadata:
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- '*'
- deployments.apps
- statefulsets.apps
podDisruptive: false
schematic:
cue:

View File

@@ -9,7 +9,10 @@ metadata:
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- '*'
- deployments.apps
- statefulsets.apps
- daemonsets.apps
- jobs.batch
podDisruptive: false
schematic:
cue:

View File

@@ -11,7 +11,10 @@ metadata:
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- '*'
- deployments.apps
- statefulsets.apps
- daemonsets.apps
- jobs.batch
schematic:
cue:
template: |

View File

@@ -0,0 +1,38 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/shared-resource.cue
apiVersion: core.oam.dev/v1beta1
kind: PolicyDefinition
metadata:
annotations:
definition.oam.dev/description: Configure the resources to be sharable across applications.
name: shared-resource
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
schematic:
cue:
template: |
#SharedResourcePolicyRule: {
// +usage=Specify how to select the targets of the rule
selector: [...#ResourcePolicyRuleSelector]
}
#ResourcePolicyRuleSelector: {
// +usage=Select resources by component names
componentNames?: [...string]
// +usage=Select resources by component types
componentTypes?: [...string]
// +usage=Select resources by oamTypes (COMPONENT or TRAIT)
oamTypes?: [...string]
// +usage=Select resources by trait types
traitTypes?: [...string]
// +usage=Select resources by resource types (like Deployment)
resourceTypes?: [...string]
// +usage=Select resources by their names
resourceNames?: [...string]
}
parameter: {
// +usage=Specify the list of rules to control shared-resource strategy at resource level.
// The selected resource will be sharable across applications. (That means multiple applications
// can all read it without conflict, but only the first one can write it)
rules?: [...#SharedResourcePolicyRule]
}

View File

@@ -5,13 +5,14 @@ kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Inject a sidecar container to K8s pod for your workload which follows the pod spec in path 'spec.template'.
labels:
custom.definition.oam.dev/ui-hidden: "true"
name: sidecar
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- '*'
- deployments.apps
- statefulsets.apps
- daemonsets.apps
- jobs.batch
podDisruptive: true
schematic:
cue:

View File

@@ -4,7 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
definition.oam.dev/description: step group
definition.oam.dev/description: A special step that you can declare 'subSteps' in it, 'subSteps' is an array containing any step type whose valid parameters do not include the `step-group` step type itself. The sub steps were executed in parallel.
labels:
custom.definition.oam.dev/ui-hidden: "true"
name: step-group
@@ -13,6 +13,6 @@ spec:
schematic:
cue:
template: |
// no parameters
parameter: {}
// no parameters, the nop only to make the template not empty or it's invalid
nop: {}

View File

@@ -10,6 +10,9 @@ metadata:
spec:
appliesToWorkloads:
- deployments.apps
- statefulsets.apps
- daemonsets.apps
- jobs.batch
podDisruptive: true
schematic:
cue:

View File

@@ -4,7 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
definition.oam.dev/description: Suspend your workflow
definition.oam.dev/description: Suspend the current workflow, it can be resumed by 'vela workflow resume' command.
name: suspend
namespace: {{ include "systemDefinitionNamespace" . }}
spec:

View File

@@ -4,7 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: PolicyDefinition
metadata:
annotations:
definition.oam.dev/description: Determining the destination where components should be deployed to.
definition.oam.dev/description: Describe the destination where components should be deployed to.
name: topology
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
@@ -13,7 +13,7 @@ spec:
template: |
parameter: {
// +usage=Specify the names of the clusters to select.
cluster?: [...string]
clusters?: [...string]
// +usage=Specify the label selector for clusters
clusterLabelSelector?: [string]: string
// +usage=Deprecated: Use clusterLabelSelector instead.

View File

@@ -4,7 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
definition.oam.dev/description: Send webhook request to the url
definition.oam.dev/description: Send a request to the specified Webhook URL. If no request body is specified, the current Application body will be sent by default.
name: webhook
namespace: {{ include "systemDefinitionNamespace" . }}
spec:

View File

@@ -306,6 +306,9 @@ spec:
if v.name == _|_ {
name: "port-" + strconv.FormatInt(v.port, 10)
}
if v.nodePort != _|_ && parameter.exposeType == "NodePort" {
nodePort: v.nodePort
}
},
]
outputs: {
@@ -354,11 +357,13 @@ spec:
protocol: *"TCP" | "UDP" | "SCTP"
// +usage=Specify if the port should be exposed
expose: *false | bool
// +usage=exposed node port. Only Valid when exposeType is NodePort
nodePort?: int
}]
// +ignore
// +usage=Specify what kind of Service you want. options: "ClusterIP", "NodePort", "LoadBalancer", "ExternalName"
exposeType: *"ClusterIP" | "NodePort" | "LoadBalancer" | "ExternalName"
// +usage=Specify what kind of Service you want. options: "ClusterIP", "NodePort", "LoadBalancer"
exposeType: *"ClusterIP" | "NodePort" | "LoadBalancer"
// +ignore
// +usage=If addRevisionLabel is true, the revision label will be added to the underlying pods

View File

@@ -33,7 +33,7 @@ kind: ClusterRole
metadata:
name: {{ include "kubevela.fullname" . }}:manager
rules:
- apiGroups: ["core.oam.dev", "terraform.core.oam.dev", "prism.oam.dev"]
- apiGroups: ["core.oam.dev", "terraform.core.oam.dev", "prism.oam.dev", "standard.oam.dev"]
resources: ["*"]
verbs: ["*"]
- apiGroups: ["cluster.open-cluster-management.io"]
@@ -217,6 +217,7 @@ spec:
- "--max-workflow-step-error-retry-times={{ .Values.workflow.step.errorRetryTimes }}"
- "--feature-gates=EnableSuspendOnFailure={{- .Values.workflow.enableSuspendOnFailure | toString -}}"
- "--feature-gates=AuthenticateApplication={{- .Values.authentication.enabled | toString -}}"
- "--feature-gates=LegacyComponentRevision={{- .Values.featureGates.enableLegacyComponentRevision | toString -}}"
{{ if .Values.authentication.enabled }}
{{ if .Values.authentication.withUser }}
- "--authentication-with-user"

View File

@@ -13,12 +13,6 @@ spec:
properties:
image: {{ .Values.imageRegistry }}{{ .Values.test.app.repository }}:{{ .Values.test.app.tag }}
port: 8000
traits:
- type: ingress
properties:
domain: testsvc.example.com
http:
"/": 8000
---
apiVersion: v1
kind: Pod
@@ -52,13 +46,5 @@ spec:
kubectl -n {{ include "systemDefinitionNamespace" . }} wait --for=condition=available deployments helm-test-express-server --timeout 3m
echo "deployment being available"
# wait for ingress being created
while ! [ `kubectl -n {{ include "systemDefinitionNamespace" . }} get ing helm-test-express-server | grep -v NAME | wc -l` = 1 ]; do
echo "waiting for ingress being created"
sleep 1
done
echo "Application and its components are created"
restartPolicy: Never

View File

@@ -0,0 +1,77 @@
{{- if not (lookup "v1" "ConfigMap" (include "systemDefinitionNamespace" .) "component-pod-view") }}
apiVersion: v1
data:
template: |
import (
"vela/ql"
)
parameter: {
appName: string
appNs: string
name?: string
cluster?: string
clusterNs?: string
}
result: ql.#CollectPods & {
app: {
name: parameter.appName
namespace: parameter.appNs
filter: {
if parameter.cluster != _|_ {
cluster: parameter.cluster
}
if parameter.clusterNs != _|_ {
clusterNamespace: parameter.clusterNs
}
if parameter.name != _|_ {
components: [parameter.name]
}
}
}
}
if result.err == _|_ {
status: {
podList: [ for pod in result.list if pod.object != _|_ {
cluster: pod.cluster
workload: pod.workload
component: pod.component
metadata: {
name: pod.object.metadata.name
namespace: pod.object.metadata.namespace
creationTime: pod.object.metadata.creationTimestamp
labels: pod.object.metadata.labels
version: {
if pod.publishVersion != _|_ {
publishVersion: pod.publishVersion
}
if pod.deployVersion != _|_ {
deployVersion: pod.deployVersion
}
}
}
status: {
phase: pod.object.status.phase
// refer to https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase
if phase != "Pending" && phase != "Unknown" {
podIP: pod.object.status.podIP
hostIP: pod.object.status.hostIP
nodeName: pod.object.spec.nodeName
}
}
}]
}
}
if result.err != _|_ {
status: {
error: result.err
}
}
kind: ConfigMap
metadata:
name: component-pod-view
namespace: {{ include "systemDefinitionNamespace" . }}
{{- end }}

View File

@@ -0,0 +1,50 @@
{{- if not (lookup "v1" "ConfigMap" (include "systemDefinitionNamespace" .) "component-service-view") }}
apiVersion: v1
data:
template: |
import (
"vela/ql"
)
parameter: {
appName: string
appNs: string
name?: string
cluster?: string
clusterNs?: string
}
result: ql.#CollectServices & {
app: {
name: parameter.appName
namespace: parameter.appNs
filter: {
if parameter.cluster != _|_ {
cluster: parameter.cluster
}
if parameter.clusterNs != _|_ {
clusterNamespace: parameter.clusterNs
}
if parameter.name != _|_ {
components: [parameter.name]
}
}
}
}
if result.err == _|_ {
status: {
services: result.list
}
}
if result.err != _|_ {
status: {
error: result.err
}
}
kind: ConfigMap
metadata:
name: component-service-view
namespace: {{ include "systemDefinitionNamespace" . }}
{{- end}}

View File

@@ -109,6 +109,10 @@ optimize:
disableResourceApplyDoubleCheck: false
enableResourceTrackerDeleteOnlyTrigger: true
##@param featureGates.enableLegacyComponentRevision if disabled, only component with rollout trait will create component revisions
featureGates:
enableLegacyComponentRevision: false
## @section MultiCluster parameters
## @param multicluster.enabled Whether to enable multi-cluster

View File

@@ -2198,6 +2198,17 @@ spec:
a context in annotation. - should mark "finish" phase in
status.conditions.'
properties:
mode:
description: WorkflowExecuteMode defines the mode of workflow
execution
properties:
steps:
description: WorkflowMode describes the mode of workflow
type: string
subSteps:
description: WorkflowMode describes the mode of workflow
type: string
type: object
ref:
type: string
steps:
@@ -2225,6 +2236,13 @@ spec:
- parameterKey
type: object
type: array
meta:
description: WorkflowStepMeta contains the meta
data of a workflow step
properties:
alias:
type: string
type: object
name:
description: Name is the unique name of the workflow
step.
@@ -2271,6 +2289,13 @@ spec:
- parameterKey
type: object
type: array
meta:
description: WorkflowStepMeta contains the
meta data of a workflow step
properties:
alias:
type: string
type: object
name:
description: Name is the unique name of the
workflow step.
@@ -2292,6 +2317,8 @@ spec:
properties:
type: object
x-kubernetes-preserve-unknown-fields: true
timeout:
type: string
type:
type: string
required:
@@ -2299,6 +2326,8 @@ spec:
- type
type: object
type: array
timeout:
type: string
type:
type: string
required:
@@ -3621,7 +3650,7 @@ spec:
appliesToWorkloads:
description: AppliesToWorkloads specifies the list of workload
kinds this trait applies to. Workload kinds are specified
in kind.group/version format, e.g. server.core.oam.dev/v1alpha2.
in resource.group/version format, e.g. server.core.oam.dev/v1alpha2.
Traits that omit this field apply to all workload kinds.
items:
type: string
@@ -3973,6 +4002,13 @@ spec:
- parameterKey
type: object
type: array
meta:
description: WorkflowStepMeta contains the meta data of
a workflow step
properties:
alias:
type: string
type: object
name:
description: Name is the unique name of the workflow step.
type: string
@@ -4017,6 +4053,13 @@ spec:
- parameterKey
type: object
type: array
meta:
description: WorkflowStepMeta contains the meta data
of a workflow step
properties:
alias:
type: string
type: object
name:
description: Name is the unique name of the workflow
step.
@@ -4038,6 +4081,8 @@ spec:
properties:
type: object
x-kubernetes-preserve-unknown-fields: true
timeout:
type: string
type:
type: string
required:
@@ -4045,6 +4090,8 @@ spec:
- type
type: object
type: array
timeout:
type: string
type:
type: string
required:

View File

@@ -1009,6 +1009,17 @@ spec:
order, and each step: - will have a context in annotation. - should
mark "finish" phase in status.conditions.'
properties:
mode:
description: WorkflowExecuteMode defines the mode of workflow
execution
properties:
steps:
description: WorkflowMode describes the mode of workflow
type: string
subSteps:
description: WorkflowMode describes the mode of workflow
type: string
type: object
ref:
type: string
steps:
@@ -1035,6 +1046,13 @@ spec:
- parameterKey
type: object
type: array
meta:
description: WorkflowStepMeta contains the meta data of
a workflow step
properties:
alias:
type: string
type: object
name:
description: Name is the unique name of the workflow step.
type: string
@@ -1079,6 +1097,13 @@ spec:
- parameterKey
type: object
type: array
meta:
description: WorkflowStepMeta contains the meta data
of a workflow step
properties:
alias:
type: string
type: object
name:
description: Name is the unique name of the workflow
step.
@@ -1100,6 +1125,8 @@ spec:
properties:
type: object
x-kubernetes-preserve-unknown-fields: true
timeout:
type: string
type:
type: string
required:
@@ -1107,6 +1134,8 @@ spec:
- type
type: object
type: array
timeout:
type: string
type:
type: string
required:

View File

@@ -708,7 +708,7 @@ spec:
appliesToWorkloads:
description: AppliesToWorkloads specifies the list of workload
kinds this trait applies to. Workload kinds are specified
in kind.group/version format, e.g. server.core.oam.dev/v1alpha2.
in resource.group/version format, e.g. server.core.oam.dev/v1alpha2.
Traits that omit this field apply to all workload kinds.
items:
type: string

View File

@@ -105,6 +105,9 @@ spec:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
skipGC:
description: SkipGC marks the resource to skip gc
type: boolean
trait:
type: string
uid:

View File

@@ -356,7 +356,7 @@ spec:
properties:
appliesToWorkloads:
description: AppliesToWorkloads specifies the list of workload kinds
this trait applies to. Workload kinds are specified in kind.group/version
this trait applies to. Workload kinds are specified in resource.group/version
format, e.g. server.core.oam.dev/v1alpha2. Traits that omit this
field apply to all workload kinds.
items:

View File

@@ -11,7 +11,10 @@ metadata:
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- '*'
- deployments.apps
- statefulsets.apps
- daemonsets.apps
- jobs.batch
podDisruptive: true
schematic:
cue:

View File

@@ -4,9 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Add annotations on K8s pod for your workload which follows the pod spec in path 'spec.template'.
labels:
custom.definition.oam.dev/ui-hidden: "true"
definition.oam.dev/description: Add annotations on your workload. if it generates pod, add same annotations for generated pods.
name: annotations
namespace: {{ include "systemDefinitionNamespace" . }}
spec:

View File

@@ -6,6 +6,7 @@ metadata:
annotations:
definition.oam.dev/description: Apply components of an application in parallel for your workflow steps
labels:
custom.definition.oam.dev/deprecated: "true"
custom.definition.oam.dev/ui-hidden: "true"
name: apply-application-in-parallel
namespace: {{ include "systemDefinitionNamespace" . }}

Some files were not shown because too many files have changed in this diff Show More