Compare commits

...

68 Commits

Author SHA1 Message Date
Somefive
3de9e391ee Feat: vela cuex eval (#5562)
* Feat: vela cuex render

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

* feat: CLI command `vela cuex eval <file>`

Signed-off-by: Zhenghao Lou <rhzx3519@gmail.com>

* responsive writer

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Signed-off-by: Zhenghao Lou <rhzx3519@gmail.com>
Co-authored-by: Zhenghao Lou <rhzx3519@gmail.com>
2023-04-23 10:21:11 +08:00
dependabot[bot]
956eb31f29 Chore: (deps): Bump golang.org/x/text from 0.8.0 to 0.9.0 (#5897)
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-21 22:46:16 +08:00
dependabot[bot]
681144319b Chore: (deps): Bump github.com/fatih/color from 1.13.0 to 1.15.0 (#5898)
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.13.0 to 1.15.0.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.13.0...v1.15.0)

---
updated-dependencies:
- dependency-name: github.com/fatih/color
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-21 22:43:29 +08:00
iyear
9042ed078b Fix: make any as top value in cue (#5893)
* Fix: make any as top value in cue

Signed-off-by: iyear <ljyngup@gmail.com>

* Feat: support different cue special type in type option

Signed-off-by: iyear <ljyngup@gmail.com>

* Fix: unit test type option

Signed-off-by: iyear <ljyngup@gmail.com>

---------

Signed-off-by: iyear <ljyngup@gmail.com>
2023-04-21 16:45:34 +08:00
Somefive
dab1618eef Feat: refactor vela help (#5895)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-21 14:19:36 +08:00
JohnJan
5549619ef9 Feat: support validate properties with CueX (#5894)
Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-04-21 10:05:40 +08:00
dependabot[bot]
a427c1e4c2 Chore: (deps): Bump github.com/oam-dev/cluster-gateway (#5891)
Bumps [github.com/oam-dev/cluster-gateway](https://github.com/oam-dev/cluster-gateway) from 1.9.0-alpha.1.0.20230412030221-d9666385607f to 1.9.0-alpha.2.
- [Release notes](https://github.com/oam-dev/cluster-gateway/releases)
- [Commits](https://github.com/oam-dev/cluster-gateway/commits/v1.9.0-alpha.2)

---
updated-dependencies:
- dependency-name: github.com/oam-dev/cluster-gateway
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-20 17:57:11 +08:00
Somefive
106b7b3670 Feat: support mark stage in gc when workflow failed (#5882)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-20 14:05:45 +08:00
dependabot[bot]
351cb83f15 Chore: (deps): Bump github.com/xanzy/go-gitlab from 0.80.0 to 0.83.0 (#5884)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.80.0 to 0.83.0.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/releases_test.go)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.80.0...v0.83.0)

---
updated-dependencies:
- dependency-name: github.com/xanzy/go-gitlab
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-19 17:45:46 +08:00
JohnJan
3d9b1b68af Feat: support parse template depends on CueX (#5848)
* Feat: support parse template depends on CueX

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Feat: support parse template depends on CueX

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

---------

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-04-19 17:40:56 +08:00
Somefive
feb819920e Feat: support connecting cluster via proxy url (#5875)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-19 11:12:02 +08:00
Somefive
859702900f Fix: upgrade dependencies (#5827)
* Fix: upgrade base

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

* upgrade gateway api

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

* Chore: (deps): Bump codecov/codecov-action from 3.1.1 to 3.1.2

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](d9f34f8cd5...40a12dcee2)

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

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* Fix: revert gateway api

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

* Feat: add docker hub login for e2e

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-19 09:39:33 +08:00
Somefive
d1a37eb2d0 Test: pend multicluster rollout test (#5873)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-18 19:03:13 +08:00
Tianxin Dong
657fcc6c64 Fix: fix terminate suspending steps (#5872)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-18 16:57:30 +08:00
Tianxin Dong
0e77b2bcc3 Chore: update cue to v0.5.0 (#5869)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-18 16:14:45 +08:00
dependabot[bot]
95cc5f1c26 Chore: (deps): Bump actions/checkout from 3.4.0 to 3.5.2 (#5866)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.4.0 to 3.5.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](24cb908017...8e5e7e5ab8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-18 15:33:21 +08:00
Somefive
61dd692819 Chore: refactor e2e test (#5871)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-18 14:39:09 +08:00
dependabot[bot]
13eb7876f3 Chore: (deps): Bump github.com/dave/jennifer from 1.6.0 to 1.6.1 (#5847)
Bumps [github.com/dave/jennifer](https://github.com/dave/jennifer) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/dave/jennifer/releases)
- [Commits](https://github.com/dave/jennifer/compare/v1.6.0...v1.6.1)

---
updated-dependencies:
- dependency-name: github.com/dave/jennifer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-17 16:32:55 +08:00
wyike
2821682c60 fix bug if addon parameter is Empty (#5856)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-04-14 17:45:09 +08:00
Jianbo Sun
863da991bc Feat: add new fields for addon metadata (#5845)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-04-14 17:16:38 +08:00
Basuotian
7b2e294a88 fix typo of clean-jobs example doc (#5855)
Signed-off-by: Basuotian <basuoluomiu@gmail.com>
2023-04-14 11:32:28 +08:00
Jianbo Sun
08a773341d Fix: refine the erorr output format (#5843)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-04-13 15:59:34 +08:00
Tianxin Dong
fea7ae5935 Fix: fix the operate order in suspend & resume (#5841)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-13 11:29:22 +08:00
dependabot[bot]
4a08caf81e Chore: (deps): Bump k8s.io/klog/v2 from 2.90.0 to 2.90.1 (#5830)
Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.90.0 to 2.90.1.
- [Release notes](https://github.com/kubernetes/klog/releases)
- [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md)
- [Commits](https://github.com/kubernetes/klog/compare/v2.90.0...v2.90.1)

---
updated-dependencies:
- dependency-name: k8s.io/klog/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-13 10:58:37 +08:00
Somefive
792f33d471 Feat: migrate prism cluster (#5836)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-12 20:25:24 +08:00
JohnJan
c007ad8df0 Feat: support config validation depends on CueX (#5796)
* Feat: support config validation depends on CueX

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Feat: support config validation depends on CueX

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Feat: support config validation depends on CueX

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Feat: support config validation depends on CueX

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

---------

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-04-12 13:58:12 +08:00
Tianxin Dong
05ac3eaeb7 Fix: fix multi clusters bottom in vela adopt (#5834)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-12 11:52:03 +08:00
Jianbo Sun
39e33c1260 Chore: update pr template and test github copilot (#5833)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-04-12 10:50:51 +08:00
iyear
167720f2e5 Chore: expose functions and refactor conversion style (#5828)
Signed-off-by: iyear <ljyngup@gmail.com>
2023-04-11 22:50:01 +08:00
iyear
6397f973d2 Chore: add special field name test case (#5826)
Signed-off-by: iyear <ljyngup@gmail.com>
2023-04-11 13:04:45 +08:00
dependabot[bot]
abb2732ce5 Chore: (deps): Bump github.com/chartmuseum/helm-push (#5724)
Bumps [github.com/chartmuseum/helm-push](https://github.com/chartmuseum/helm-push) from 0.10.2 to 0.10.3.
- [Release notes](https://github.com/chartmuseum/helm-push/releases)
- [Changelog](https://github.com/chartmuseum/helm-push/blob/main/.goreleaser.yml)
- [Commits](https://github.com/chartmuseum/helm-push/compare/v0.10.2...v0.10.3)

---
updated-dependencies:
- dependency-name: github.com/chartmuseum/helm-push
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 10:11:41 +08:00
dependabot[bot]
ab156efbb5 Chore: (deps): Bump github.com/fluxcd/helm-controller/api (#5798)
Bumps [github.com/fluxcd/helm-controller/api](https://github.com/fluxcd/helm-controller) from 0.21.0 to 0.32.1.
- [Release notes](https://github.com/fluxcd/helm-controller/releases)
- [Changelog](https://github.com/fluxcd/helm-controller/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fluxcd/helm-controller/compare/v0.21.0...v0.32.1)

---
updated-dependencies:
- dependency-name: github.com/fluxcd/helm-controller/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 10:08:21 +08:00
Somefive
bfa5f4c641 Feat: upgrade pkg & workflow (#5819)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-11 09:59:58 +08:00
Somefive
57dd6d105f Chore: update codeowners (#5818)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-10 13:59:32 +08:00
Somefive
d8af202242 Feat: upgrade k8s.io to 0.26 (#5758)
* Feat: upgrade k8s.io to 0.26

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

* Feat: replace temp replace

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-10 11:19:05 +08:00
qiaozp
5ef0798d89 Chore: bump testing to Kubernetes v1.26 (#5816)
* Chore: bump testing to Kubernetes v1.25

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

* fix condition in e2e test

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

* Bump e2e-multicluster-test to v1.25

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

* Bump e2e-rollout-test and rebase

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

* Fix: EndpointSlice v1beta1 is depracated

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

* fix vela ql test

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

* remove comment

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

* Bump all e2e test environment to v1.26

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

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-04-07 17:28:51 +08:00
zhaohuiweixiao
76dc154e92 Refactor: the addon dependency installation logic is accurate to the cluster (#5206)
* Refactor: the addon dependency installation logic is accurate to the cluster

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

* Fix: optimize the code based on the review

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

* Feat: add unit test for func checkDependencyNeedInstall

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

---------

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
2023-04-07 17:15:44 +08:00
Mcduller
eba40ab20d Feat: support vela def vet the input "dir" and many cue files (#5806)
* Feat: support vela def vet the input "dir" and many cue files

Signed-off-by: Mcduller <1596582524@qq.com>

* Feat: support vela def vet the input "dir" and many cue files

Signed-off-by: Mcduller <1596582524@qq.com>

---------

Signed-off-by: Mcduller <1596582524@qq.com>
2023-04-07 14:12:37 +08:00
朱晓兵
3ae9381d6c Feat: compatible with k8s last-applied-configuration while perfer app.oam.dev/last-applied-configuration in annotations (#5804)
* Fix: when taking over an existing resource for the first time, use kubectl last apply anno

Signed-off-by: zxbyoyoyo <596908030@qq.com>

* Fix: '-' || 'skip' return nil

Signed-off-by: zxbyoyoyo <596908030@qq.com>

* Fix: check-diff

Signed-off-by: zxbyoyoyo <596908030@qq.com>

---------

Signed-off-by: zxbyoyoyo <596908030@qq.com>
2023-04-07 11:05:42 +08:00
Tianxin Dong
c128c71e29 Fix: use step id to filter the log data and fix the regex (#5809)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-07 10:39:23 +08:00
iyear
2bd593855b Fix: can't reuse modified ref options (#5795)
Signed-off-by: iyear <ljyngup@gmail.com>
2023-04-06 20:02:49 +08:00
Tianxin Dong
3c2d47be6e Fix: fix step id to name in workflow logs (#5805)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-06 14:56:22 +08:00
qiaozp
c24cbdc6f9 Feat: compatibility on componentDefinition spec.workload.definition field (#5800)
* Feat: compatibility on componentDefinition spec.workload.definition field

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

* rollback

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

* remove hack fallback

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

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-04-06 11:48:26 +08:00
dependabot[bot]
0a368ec856 Chore: (deps): Bump ossf/scorecard-action from 2.1.2 to 2.1.3 (#5790) 2023-04-06 03:05:09 +00:00
Tianxin Dong
7ea237d580 Feat: add mode in steps for step group (#5799) 2023-04-06 10:52:48 +08:00
iyear
06eb414f1e Feat: add type filter option (#5789)
Signed-off-by: iyear <ljyngup@gmail.com>
2023-04-04 09:56:54 +08:00
wyike
52b1f20e5f Fix: filter rollout created by rolling-release in vela workflow resume (#5783)
* filter rollout created by rolling-release

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

* fix golint

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

* use annotation instead trait type

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

* use annotations instead of triat type

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

* lint go import

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

---------

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-04-03 15:28:46 +08:00
Somefive
d8f92e0b44 Feat: vela cluster join support overwrite (#5784)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-03 10:12:44 +08:00
zhaohuiweixiao
1a04121894 Feat: list addon with specify registry (#5780) 2023-03-31 17:47:41 +08:00
Jianbo Sun
6e4460e3fb Feat: expose trait with new ports (#5781)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-03-31 15:56:18 +08:00
Zhenghao Lou
784106cdf3 Fix: component name generated by vela adopt is not in lowecase (#5775)
CUE: fix the adopt-templates/default.cue

closes #5771

Signed-off-by: Zhenghao Lou <rhzx3519@gmail.com>
2023-03-30 13:58:32 +08:00
wyike
bb34012c3a Feat: add check prometheus metrics workflowStepDefinition (#5768)
* add metrics

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

add check metrics

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

* add check-metrics definition example

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

rename example

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

* small fix

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

* fix lint

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

* add default metrics

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

---------

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-03-30 11:11:25 +08:00
iyear
d5ecb7b870 Refactor: split Generate function (#5763)
Signed-off-by: iyear <ljyngup@gmail.com>
2023-03-29 17:56:41 +08:00
Tianxin Dong
d4576db82d Chore: stable the version of workflow to 0.5.0 for 1.8 release (#5759)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-03-29 11:49:01 +08:00
Somefive
542b32bcf4 Chore: fix definition parse logic and allow if/for comprehension & use op.#Suspend for deploy (#5743)
* Chore: fix definition parse logic and allow if/for comprehension & use op.#Suspend for deploy

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

* Fix: flaky mc test

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

* Fix: flaky mc test

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-28 15:35:15 +08:00
howieyuen
8619f1c413 Fix: vela top cannot switch the theme (#5745)
Signed-off-by: howieyuen <howieyuen@outlook.com>
2023-03-28 13:50:00 +08:00
dependabot[bot]
d06d3bee79 Chore: (deps): Bump rajatjindal/krew-release-bot from 0.0.43 to 0.0.46 (#5747)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-28 09:30:57 +08:00
qiaozp
2e109dd77b Fix: gateway message is wrong (#5748)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-03-27 22:25:09 +08:00
Basuotian
1afdb09964 vela adopt support multi-cluster adoption (#5635)
Signed-off-by: Basuotian <basuoluomiu@gmail.com>
2023-03-27 15:28:44 +08:00
Somefive
b71efddfc8 Feat: fix flacky test (#5741)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-27 13:52:48 +08:00
Somefive
9dc0db4cfc Feat: add qps for load test client (#5733)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-24 18:04:18 +08:00
iyear
de790e6fae Feat: support nullable option (#5736)
Signed-off-by: iyear <ljyngup@gmail.com>
2023-03-24 16:24:05 +08:00
Somefive
e70d2a1021 Feat: enhance vela adopt and refactor (#5728)
* Feat: enhance vela adopt and refactor

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

* Fix: flaky mc test

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-24 16:23:01 +08:00
Somefive
5790e57423 Feat: remove comp name dup check (#5727) 2023-03-24 15:21:58 +08:00
Somefive
4aa14fc337 Feat: support pause reconcile (#5732)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-24 13:19:44 +08:00
iyear
d694dff4de Refactor: option pattern (#5720)
* Refactor: option pattern

Signed-off-by: iyear <ljyngup@gmail.com>

* Fix: nil check and add tests

Signed-off-by: iyear <ljyngup@gmail.com>

---------

Signed-off-by: iyear <ljyngup@gmail.com>
2023-03-24 12:06:34 +08:00
qiaozp
6b4da4fa45 Feat: add sub-module to Golang SDK (#5655)
* wait to deal with go.mod

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

* seperate def and module modifier

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

* fix module import

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

* refine code

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

* remove the pointer reference in loop

generalize the language-specific argument parsing

amend tests

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

* remove focused test

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

* fix test

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

* update command usage

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

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-03-24 11:28:56 +08:00
S Code Man
fe279cf20d Fix: fix vela-minimal helm chart unrecognised options (#5721)
* fix(vela-minimal): fix unrecognised options

Signed-off-by: florent.madiot.e <florent.madiot.e@thalesdigital.io>

* Fix(vela-minimal): make reviewable

Signed-off-by: florent.madiot.e <florent.madiot.e@thalesdigital.io>

---------

Signed-off-by: florent.madiot.e <florent.madiot.e@thalesdigital.io>
2023-03-24 11:28:35 +08:00
386 changed files with 5160 additions and 1763 deletions

12
.github/CODEOWNERS vendored
View File

@@ -7,7 +7,7 @@ design/ @barnettZQG @leejanee @wonderflow @Somefive @
pkg/controller/core.oam.dev @Somefive @FogDong @barnettZQG @wonderflow
# Owner of Standard Controllers
pkg/controller/standard.oam.dev @wangyikewxgm @barnettZQG @wonderflow
pkg/controller/standard.oam.dev @wangyikewxgm @barnettZQG @wonderflow @Somefive
# Owner of CUE
pkg/cue @leejanee @FogDong @Somefive
@@ -30,10 +30,10 @@ references/cli/ @Somefive @zzxwill @StevenLeiZhang @charlie0
pkg/addon/ @wangyikewxgm @wonderflow @charlie0129
# Owner of resource keeper and tracker
pkg/resourcekeeper @Somefive @FogDong
pkg/resourcetracker @Somefive @FogDong
pkg/resourcekeeper @Somefive @FogDong @chivalryq
pkg/resourcetracker @Somefive @FogDong @chivalryq
.github/ @chivalryq @wonderflow
makefiles @chivalryq @wonderflow
go.* @chivalryq @wonderflow
.github/ @chivalryq @wonderflow @Somefive @FogDong
makefiles @chivalryq @wonderflow @Somefive @FogDong
go.* @chivalryq @wonderflow @Somefive @FogDong

View File

@@ -1,6 +1,8 @@
### Description of your changes
copilot:all
<!--
Briefly describe what this pull request does. We love pull requests that resolve an open KubeVela issue. If yours does, you

View File

@@ -10,14 +10,14 @@ permissions:
jobs:
# align with crossplane's choice https://github.com/crossplane/crossplane/blob/master/.github/workflows/backport.yml
open-pr:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: github.event.pull_request.merged
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
fetch-depth: 0

View File

@@ -29,9 +29,9 @@ jobs:
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
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Get git revision
id: vars
shell: bash

View File

@@ -10,7 +10,7 @@ permissions:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
actions: read # for github/codeql-action/init to get workflow details
@@ -23,7 +23,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Initialize CodeQL
uses: github/codeql-action/init@959cbb7472c4d4ad70cdfe6f4976053fe48ab394 # v2.1.37

View File

@@ -13,7 +13,7 @@ permissions:
jobs:
check:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: thehanimo/pr-title-checker@v1.3.7
with:

View File

@@ -14,7 +14,7 @@ permissions:
jobs:
core-api-test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Set up Go 1.19
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
@@ -25,7 +25,7 @@ jobs:
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Get the version
id: get_version

View File

@@ -20,7 +20,7 @@ env:
jobs:
definition-doc:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
@@ -28,7 +28,7 @@ jobs:
go-version: ${{ env.GO_VERSION }}
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
submodules: true

View File

@@ -25,7 +25,7 @@ jobs:
detect-noop:
permissions:
actions: write
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
@@ -39,12 +39,12 @@ jobs:
continue-on-error: true
e2e-multi-cluster-tests:
runs-on: aliyun
runs-on: self-hosted
needs: [ detect-noop ]
if: needs.detect-noop.outputs.noop != 'true'
strategy:
matrix:
k8s-version: ["v1.20","v1.24"]
k8s-version: ["v1.26"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true
@@ -52,7 +52,7 @@ jobs:
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
@@ -71,7 +71,7 @@ jobs:
- name: Calculate K3d args
run: |
EGRESS_ARG=""
if [[ "${{ matrix.k8s-version }}" == v1.24 ]]; then
if [[ "${{ matrix.k8s-version }}" == v1.26 ]]; then
EGRESS_ARG="--k3s-arg --egress-selector-mode=disabled@server:0"
fi
echo "EGRESS_ARG=${EGRESS_ARG}" >> $GITHUB_ENV
@@ -118,7 +118,7 @@ jobs:
make end-e2e-core-shards
- name: Upload coverage report
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
uses: codecov/codecov-action@40a12dcee2df644d47232dde008099a3e9e4f865
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: /tmp/e2e-profile.out,/tmp/e2e_multicluster_test.out
@@ -130,4 +130,6 @@ jobs:
- name: Cleanup image
if: ${{ always() }}
run: make image-cleanup
run: |
make image-cleanup
docker image prune -f --filter "until=24h"

View File

@@ -1,17 +1,17 @@
name: E2E Rollout Test
on:
push:
branches:
- master
- release-*
tags:
- v*
# push:
# branches:
# - master
# - release-*
# tags:
# - v*
workflow_dispatch: {}
pull_request:
branches:
- master
- release-*
# pull_request:
# branches:
# - master
# - release-*
permissions:
contents: read
@@ -25,7 +25,7 @@ jobs:
detect-noop:
permissions:
actions: write
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
@@ -39,12 +39,12 @@ jobs:
continue-on-error: true
e2e-rollout-tests:
runs-on: aliyun
runs-on: self-hosted
needs: [ detect-noop ]
if: needs.detect-noop.outputs.noop != 'true'
strategy:
matrix:
k8s-version: ["v1.20","v1.24"]
k8s-version: ["v1.26"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true
@@ -52,7 +52,7 @@ jobs:
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
@@ -63,6 +63,11 @@ jobs:
run: |
go get -v -t -d ./...
- name: Get Ginkgo
run: |
go install github.com/onsi/ginkgo/ginkgo
go get github.com/onsi/gomega/...
- name: Tear down K3d if exist
run: |
k3d cluster delete || true
@@ -71,7 +76,7 @@ jobs:
- name: Calculate K3d args
run: |
EGRESS_ARG=""
if [[ "${{ matrix.k8s-version }}" == v1.24 ]]; then
if [[ "${{ matrix.k8s-version }}" == v1.26 ]]; then
EGRESS_ARG="--k3s-arg --egress-selector-mode=disabled@server:0"
fi
echo "EGRESS_ARG=${EGRESS_ARG}" >> $GITHUB_ENV
@@ -101,7 +106,7 @@ jobs:
run: make end-e2e
- name: Upload coverage report
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
uses: codecov/codecov-action@40a12dcee2df644d47232dde008099a3e9e4f865
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: /tmp/e2e-profile.out
@@ -113,4 +118,7 @@ jobs:
- name: Cleanup image
if: ${{ always() }}
run: make image-cleanup
run: |
make image-cleanup
docker image prune -a -f --filter "until=24h"

View File

@@ -25,7 +25,7 @@ jobs:
detect-noop:
permissions:
actions: write
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
@@ -39,20 +39,19 @@ jobs:
continue-on-error: true
e2e-tests:
runs-on: aliyun
runs-on: self-hosted
needs: [ detect-noop ]
if: needs.detect-noop.outputs.noop != 'true'
strategy:
matrix:
k8s-version: ["v1.20","v1.24"]
k8s-version: ["v1.26"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
@@ -63,6 +62,11 @@ jobs:
run: |
go get -v -t -d ./...
- name: Get Ginkgo
run: |
go install github.com/onsi/ginkgo/ginkgo
go get github.com/onsi/gomega/...
- name: Tear down K3d if exist
run: |
k3d cluster delete || true
@@ -71,7 +75,7 @@ jobs:
- name: Calculate K3d args
run: |
EGRESS_ARG=""
if [[ "${{ matrix.k8s-version }}" == v1.24 ]]; then
if [[ "${{ matrix.k8s-version }}" == v1.26 ]]; then
EGRESS_ARG="--k3s-arg --egress-selector-mode=disabled@server:0"
fi
echo "EGRESS_ARG=${EGRESS_ARG}" >> $GITHUB_ENV
@@ -108,7 +112,7 @@ jobs:
run: make end-e2e
- name: Upload coverage report
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
uses: codecov/codecov-action@40a12dcee2df644d47232dde008099a3e9e4f865
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: /tmp/e2e-profile.out
@@ -120,4 +124,6 @@ jobs:
- name: Cleanup image
if: ${{ always() }}
run: make image-cleanup
run: |
make image-cleanup
docker image prune -f --filter "until=24h"

View File

@@ -22,7 +22,7 @@ env:
jobs:
detect-noop:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
permissions:
@@ -38,7 +38,7 @@ jobs:
continue-on-error: true
staticcheck:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
@@ -49,7 +49,7 @@ jobs:
go-version: ${{ env.GO_VERSION }}
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
submodules: true
@@ -60,7 +60,7 @@ jobs:
run: make check-license-header
lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
permissions:
@@ -74,7 +74,7 @@ jobs:
go-version: ${{ env.GO_VERSION }}
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
submodules: true
@@ -88,13 +88,13 @@ jobs:
version: ${{ env.GOLANGCI_VERSION }}
check-diff:
runs-on: aliyun
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
submodules: true
@@ -115,6 +115,16 @@ jobs:
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-pkg-
- name: Tear down K3d if exist
run: |
k3d cluster delete || true
- name: Setup K3d (Hub)
uses: nolar/setup-k3d-k3s@293b8e5822a20bc0d5bcdd4826f1a665e72aba96
with:
version: ${{ matrix.k8s-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run cross-build
run: make cross-build
@@ -133,7 +143,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
submodules: true
@@ -159,12 +169,12 @@ jobs:
.\bin\vela.exe version
check-core-image-build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
submodules: true
- name: Set up QEMU
@@ -179,12 +189,12 @@ jobs:
platforms: linux/amd64,linux/arm64
check-cli-image-build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
submodules: true
- name: Set up QEMU

View File

@@ -10,10 +10,10 @@ permissions:
jobs:
bot:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout Actions
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
repository: "oam-dev/kubevela-github-actions"
path: ./actions
@@ -72,7 +72,7 @@ jobs:
})
console.log("Added '" + label + "' label.")
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
fetch-depth: 0
- name: Open Backport PR

View File

@@ -15,10 +15,10 @@ permissions:
jobs:
license_check:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: Check for unapproved licenses
steps:
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:

View File

@@ -18,9 +18,9 @@ jobs:
publish-core-images:
permissions:
packages: write
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Get the version
id: get_version
run: |
@@ -98,9 +98,9 @@ jobs:
publish-addon-images:
permissions:
packages: write
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Get the version
id: get_version
run: |
@@ -161,9 +161,9 @@ jobs:
CAPABILITY_BUCKET: kubevela-registry
CAPABILITY_DIR: capabilities
CAPABILITY_ENDPOINT: oss-cn-beijing.aliyuncs.com
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Install ossutil
run: wget http://gosspublic.alicdn.com/ossutil/1.7.0/ossutil64 && chmod +x ossutil64 && mv ossutil64 ossutil
- name: Configure Alibaba Cloud OSSUTIL

View File

@@ -26,11 +26,11 @@ jobs:
pull-requests: read
repository-projects: read
statuses: read
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: goreleaser
steps:
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
fetch-depth: 0
- run: git fetch --force --tags
@@ -78,14 +78,14 @@ jobs:
repository-projects: read
statuses: read
needs: build
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: ${{ !contains(github.ref, 'alpha') && !contains(github.ref, 'beta') && !contains(github.ref, 'rc') }}
name: upload-sha256sums
steps:
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Update kubectl plugin version in krew-index
uses: rajatjindal/krew-release-bot@92da038bbf995803124a8e50ebd438b2f37bbbb0 # v0.0.43
uses: rajatjindal/krew-release-bot@df3eb197549e3568be8b4767eec31c5e8e8e6ad8 # v0.0.46
- name: Update Homebrew formula
uses: dawidd6/action-homebrew-bump-formula@e9b43cd30eec6ea80777e7e22e1526beb1675c18 # v3.9.0
with:

View File

@@ -12,7 +12,7 @@ permissions: read-all
jobs:
analysis:
name: Scorecards analysis
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
@@ -23,12 +23,12 @@ jobs:
steps:
- name: "Checkout code"
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # tag=v2.1.2
uses: ossf/scorecard-action@80e868c13c90f172d68d1f4501dee99e2479f7af # tag=v2.1.3
with:
results_file: results.sarif
results_format: sarif

View File

@@ -23,10 +23,10 @@ env:
jobs:
sdk-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
@@ -42,10 +42,10 @@ jobs:
run: make vela-cli
- name: Build SDK
run: bin/vela def gen-api -f vela-templates/definitions/internal/ -o ./kubevela-go-sdk --package=github.com/kubevela-contrib/kubevela-go-sdk
run: bin/vela def gen-api -f vela-templates/definitions/internal/ -o ./kubevela-go-sdk --package=github.com/kubevela-contrib/kubevela-go-sdk --init
- name: Validate SDK
run: |
cd kubevela-go-sdk
go mod tidy
golangci-lint run --timeout 5m ./...
golangci-lint run --timeout 5m -e "exported:" -e "dot-imports" ./...

View File

@@ -15,7 +15,7 @@ env:
jobs:
sync-core-api:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Set up Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
@@ -23,7 +23,7 @@ jobs:
go-version: ${{ env.GO_VERSION }}
- name: Check out code into the Go module directory
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Get the version
id: get_version

View File

@@ -19,7 +19,7 @@ env:
jobs:
sync_sdk:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Set up Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
@@ -27,7 +27,7 @@ jobs:
go-version: ${{ env.GO_VERSION }}
- name: Check out code into the Go module directory
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Get the version
id: get_version

View File

@@ -1,14 +0,0 @@
name: Timed Task
on:
schedule:
- cron: '* * * * *'
permissions:
contents: read
jobs:
clean-image:
runs-on: aliyun
steps:
- name: Cleanup image
run: docker image prune -f

View File

@@ -10,10 +10,10 @@ permissions:
jobs:
images:
name: Image Scan
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Build Vela Core image from Dockerfile
run: |

View File

@@ -23,7 +23,7 @@ jobs:
detect-noop:
permissions:
actions: write # for fkirc/skip-duplicate-actions to skip or stop workflow runs
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
@@ -37,7 +37,7 @@ jobs:
continue-on-error: true
unit-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
@@ -48,7 +48,7 @@ jobs:
go-version: ${{ env.GO_VERSION }}
- name: Check out code into the Go module directory
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
submodules: true
@@ -83,7 +83,7 @@ jobs:
run: make test
- name: Upload coverage report
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
uses: codecov/codecov-action@40a12dcee2df644d47232dde008099a3e9e4f865
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt

View File

@@ -31,6 +31,9 @@ type GarbageCollectPolicySpec struct {
// outdated resources will be kept until resourcetracker be deleted manually
KeepLegacyResource bool `json:"keepLegacyResource,omitempty"`
// ContinueOnFailure if is set, continue to execute gc when the workflow fails, by default gc will be executed only after the workflow succeeds
ContinueOnFailure bool `json:"continueOnFailure,omitempty"`
// Order defines the order of garbage collect
Order GarbageCollectOrder `json:"order,omitempty"`

View File

@@ -176,9 +176,8 @@ type Capability struct {
Namespace string `json:"namespace,omitempty"`
// Plugin Source
Source *Source `json:"source,omitempty"`
Install *Installation `json:"install,omitempty"`
CrdInfo *CRDInfo `json:"crdInfo,omitempty"`
Source *Source `json:"source,omitempty"`
CrdInfo *CRDInfo `json:"crdInfo,omitempty"`
// Terraform
TerraformConfiguration string `json:"terraformConfiguration,omitempty"`

View File

@@ -37,9 +37,6 @@ const (
)
var (
// AnnotationClusterAlias the annotation key for cluster alias
AnnotationClusterAlias = config.MetaApiGroupName + "/cluster-alias"
// AnnotationClusterVersion the annotation key for cluster version
AnnotationClusterVersion = config.MetaApiGroupName + "/cluster-version"
)

View File

@@ -49,7 +49,6 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --wai
| `disableCaps` | Disable capability | `rollout` |
| `dependCheckWait` | dependCheckWait is the time to wait for ApplicationConfiguration's dependent-resource ready | `30s` |
### KubeVela workflow parameters
| Name | Description | Value |
@@ -59,7 +58,6 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --wai
| `workflow.backoff.maxTime.failedState` | The max backoff time of workflow in a failed condition | `300` |
| `workflow.step.errorRetryTimes` | The max retry times of a failed workflow step | `10` |
### KubeVela controller parameters
| Name | Description | Value |
@@ -77,7 +75,6 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --wai
| `webhookService.port` | KubeVela webhook service port | `9443` |
| `healthCheck.port` | KubeVela health check port | `9440` |
### KubeVela controller optimization parameters
| Name | Description | Value |
@@ -104,7 +101,6 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --wai
| `featureGates.sharedDefinitionStorageForApplicationRevision` | use definition cache to reduce duplicated definition storage for application revision, must be used with InformerCacheFilterUnnecessaryFields | `true` |
| `featureGates.disableWorkflowContextConfigMapCache` | disable the workflow context's configmap informer cache | `true` |
### MultiCluster parameters
| Name | Description | Value |
@@ -125,7 +121,6 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --wai
| `multicluster.clusterGateway.secureTLS.certPath` | Path to the certificate file | `/etc/k8s-cluster-gateway-certs` |
| `multicluster.clusterGateway.secureTLS.certManager.enabled` | Whether to enable cert-manager | `false` |
### Test parameters
| Name | Description | Value |
@@ -135,7 +130,6 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --wai
| `test.k8s.repository` | Test k8s repository | `oamdev/alpine-k8s` |
| `test.k8s.tag` | Test k8s tag | `1.18.2` |
### Common parameters
| Name | Description | Value |

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: applicationrevisions.core.oam.dev
spec:
group: core.oam.dev
@@ -2306,6 +2306,11 @@ spec:
alias:
type: string
type: object
mode:
description: Mode is only valid for sub steps, it
defines the mode of the sub steps
nullable: true
type: string
name:
description: Name is the unique name of the workflow
step.
@@ -4168,6 +4173,11 @@ spec:
alias:
type: string
type: object
mode:
description: Mode is only valid for sub steps, it defines
the mode of the sub steps
nullable: true
type: string
name:
description: Name is the unique name of the workflow step.
type: string

View File

@@ -3,7 +3,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: vela-system/kubevela-vela-core-root-cert
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: applications.core.oam.dev
spec:
group: core.oam.dev
@@ -1068,6 +1068,11 @@ spec:
alias:
type: string
type: object
mode:
description: Mode is only valid for sub steps, it defines
the mode of the sub steps
nullable: true
type: string
name:
description: Name is the unique name of the workflow step.
type: string

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: componentdefinitions.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: definitionrevisions.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: healthscopes.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: policies.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: policydefinitions.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: resourcetrackers.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: scopedefinitions.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: traitdefinitions.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: workflowstepdefinitions.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: workloaddefinitions.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: rollouts.standard.oam.dev
spec:
group: standard.oam.dev

View File

@@ -113,6 +113,7 @@ spec:
}]
}
}
#labelSelector: {
matchLabels?: [string]: string
matchExpressions?: [...{
@@ -121,21 +122,25 @@ spec:
values?: [...string]
}]
}
#podAffinityTerm: {
labelSelector?: #labelSelector
namespaces?: [...string]
topologyKey: string
namespaceSelector?: #labelSelector
}
#nodeSelecor: {
key: string
operator: *"In" | "NotIn" | "Exists" | "DoesNotExist" | "Gt" | "Lt"
values?: [...string]
}
#nodeSelectorTerm: {
matchExpressions?: [...#nodeSelecor]
matchFields?: [...#nodeSelecor]
}
parameter: {
// +usage=Specify the pod affinity scheduling rules
podAffinity?: {

View File

@@ -17,12 +17,14 @@ spec:
// +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]
@@ -37,6 +39,7 @@ spec:
// +usage=Select resources by their names
resourceNames?: [...string]
}
parameter: {
// +usage=Whether to enable apply-once for the whole application
enable: *false | bool

View File

@@ -24,6 +24,7 @@ spec:
apply: op.#ApplyRemaining & {
parameter
}
parameter: {
// +usage=Declare the name of the component
exceptions?: [...string]

View File

@@ -0,0 +1,59 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/check-metrics.cue
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Application Delivery
definition.oam.dev/description: Verify application's metrics
labels:
custom.definition.oam.dev/catalog: Delivery
name: check-metrics
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
schematic:
cue:
template: |
import (
"vela/op"
)
check: op.#PromCheck & {
query: parameter.query
metricEndpoint: parameter.metricEndpoint
condition: parameter.condition
stepID: context.stepSessionID
duration: parameter.duration
failDuration: parameter.failDuration
}
fail: op.#Steps & {
if check.failed != _|_ {
if check.failed == true {
breakWorkflow: op.#Fail & {
message: check.message
}
}
}
}
wait: op.#ConditionalWait & {
continue: check.result
if check.message != _|_ {
message: check.message
}
}
parameter: {
// +usage=Query is a raw prometheus query to perform
query: string
// +usage=The HTTP address and port of the prometheus server
metricEndpoint?: "http://prometheus-server.o11y-system.svc:9090" | string
// +usage=Condition is an expression which determines if a measurement is considered successful. eg: >=0.95
condition: string
// +usage=Duration defines the duration of time required for this step to be considered successful.
duration?: *"5m" | string
// +usage=FailDuration is the duration of time that, if the check fails, will result in the step being marked as failed.
failDuration?: *"2m" | string
}

View File

@@ -20,6 +20,7 @@ spec:
labelselector?: {...}
namespace: *context.namespace | string
}
cleanJobs: op.#Delete & {
value: {
apiVersion: "batch/v1"
@@ -39,6 +40,7 @@ spec:
}
}
}
cleanPods: op.#Delete & {
value: {
apiVersion: "v1"

View File

@@ -35,6 +35,7 @@ spec:
}
}
} @step(1)
outputs: {
eps_port_name_filtered: *[] | [...]
if parameter.portName == _|_ {
@@ -69,9 +70,11 @@ spec:
endpoints: eps_port_filtered
}
}
wait: op.#ConditionalWait & {
continue: len(outputs.endpoints) > 0
} @step(2)
value: {
if len(outputs.endpoints) > 0 {
endpoint: outputs.endpoints[0].endpoint
@@ -79,6 +82,7 @@ spec:
url: "\(parameter.protocal)://\(endpoint.host):\(_portStr)"
}
}
parameter: {
// +usage=Specify the name of the application
name?: string

View File

@@ -107,9 +107,11 @@ spec:
}]
}
}
parameter: *#PatchParams | close({
// +usage=Specify the commands for multiple containers
containers: [...#PatchParams]
})
errs: [ for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}]

View File

@@ -72,9 +72,11 @@ spec:
}]
}
}
parameter: #PatchParams | close({
// +usage=Specify the container image for multiple containers
containers: [...#PatchParams]
})
errs: [ for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}]

View File

@@ -29,6 +29,7 @@ spec:
targetCPUUtilizationPercentage: parameter.cpuUtil
}
}
parameter: {
// +usage=Specify the minimal number of replicas to which the autoscaler can scale down
min: *1 | int

View File

@@ -147,6 +147,7 @@ spec:
}
}
}
parameter: {
// +usage=Specify the labels in the workload
labels?: [string]: string
@@ -276,6 +277,7 @@ spec:
// +usage=Instructions for assessing whether the container is in a suitable state to serve traffic.
readinessProbe?: #HealthProbe
}
#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.
@@ -318,8 +320,5 @@ spec:
failureThreshold: *3 | int
}
workload:
definition:
apiVersion: batch/v1beta1
kind: CronJob
type: cronjobs.batch
type: autodetects.core.oam.dev

View File

@@ -66,6 +66,7 @@ spec:
}
},
]
volumesList: [
if parameter.volumeMounts != _|_ && parameter.volumeMounts.pvc != _|_ for v in parameter.volumeMounts.pvc {
{
@@ -114,6 +115,7 @@ spec:
}
},
]
deDupVolumesArray: [
for val in [
for i, vi in volumesList {
@@ -126,6 +128,7 @@ spec:
val
},
]
output: {
apiVersion: "apps/v1"
kind: "DaemonSet"
@@ -275,6 +278,7 @@ spec:
}
}
}
exposePorts: [
if parameter.ports != _|_ for v in parameter.ports if v.expose == true {
port: v.port
@@ -287,6 +291,7 @@ spec:
}
},
]
outputs: {
if len(exposePorts) != 0 {
webserviceExpose: {
@@ -301,6 +306,7 @@ spec:
}
}
}
parameter: {
// +usage=Specify the labels in the workload
labels?: [string]: string
@@ -469,6 +475,7 @@ spec:
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.

View File

@@ -26,6 +26,7 @@ spec:
// context.namespace indicates the name of the app
name: context.name
}
parameter: {
// +usage=Declare the name of the env-binding policy, if empty, the first env-binding policy will be used
policy: *"" | string

View File

@@ -18,6 +18,9 @@ spec:
"vela/op"
)
if parameter.auto == false {
suspend: op.#Suspend & {message: "Waiting approval to the deploy step \"\(context.stepName)\""}
}
deploy: op.#Deploy & {
policies: parameter.policies
parallelism: parameter.parallelism

View File

@@ -27,6 +27,7 @@ spec:
// context.namespace indicates the namespace of the app
namespace: context.namespace
}
parameter: {
// +usage=Declare the name of the env-binding policy, if empty, the first env-binding policy will be used
policy: *"" | string

View File

@@ -41,6 +41,7 @@ spec:
}
}
}
parameter: {
// +usage=Declare the runtime clusters to apply, if empty, all runtime clusters will be used
clusters?: [...string]

View File

@@ -98,9 +98,11 @@ spec:
}]
}
}
parameter: *#PatchParams | close({
// +usage=Specify the environment variables for multiple containers
containers: [...#PatchParams]
})
errs: [ for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}]

View File

@@ -26,6 +26,7 @@ spec:
disable: *false | bool
}]
}
parameter: envs: [...{
name: string
placement?: {

View File

@@ -38,12 +38,14 @@ spec:
stringData: parameter.data
}
} @step(1)
getPlacements: op.#GetPlacementsFromTopologyPolicies & {
policies: *[] | [...string]
if parameter.topology != _|_ {
policies: [parameter.topology]
}
} @step(2)
} @step(2)
apply: op.#Steps & {
for p in getPlacements.placements {
(p.cluster): op.#Apply & {
@@ -52,6 +54,7 @@ spec:
}
}
} @step(3)
parameter: {
// +usage=Specify the name of the export destination
name?: string

View File

@@ -49,12 +49,14 @@ spec:
ports: [{port: parameter.targetPort}]
}]
}] @step(1)
getPlacements: op.#GetPlacementsFromTopologyPolicies & {
policies: *[] | [...string]
if parameter.topology != _|_ {
policies: [parameter.topology]
}
} @step(2)
} @step(2)
apply: op.#Steps & {
for p in getPlacements.placements {
for o in objects {
@@ -65,6 +67,7 @@ spec:
}
}
} @step(3)
parameter: {
// +usage=Specify the name of the export destination
name?: string

View File

@@ -17,6 +17,7 @@ spec:
template: |
import (
"strconv"
"strings"
)
outputs: service: {
@@ -25,22 +26,66 @@ spec:
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
if parameter["matchLabels"] == _|_ {
selector: "app.oam.dev/component": context.name
}
if parameter["matchLabels"] != _|_ {
selector: parameter["matchLabels"]
}
// compatible with the old way
if parameter["port"] != _|_ if parameter["ports"] == _|_ {
ports: [
for p in parameter.port {
name: "port-" + strconv.FormatInt(p, 10)
port: p
targetPort: p
},
]
}
if parameter["ports"] != _|_ {
ports: [ for v in parameter.ports {
port: v.port
targetPort: v.port
if v.name != _|_ {
name: v.name
}
if v.name == _|_ {
_name: "port-" + strconv.FormatInt(v.port, 10)
name: *_name | string
if v.protocol != "TCP" {
name: _name + "-" + strings.ToLower(v.protocol)
}
}
if v.nodePort != _|_ if parameter.type == "NodePort" {
nodePort: v.nodePort
}
if v.protocol != _|_ {
protocol: v.protocol
}
},
]
]
}
type: parameter.type
}
}
parameter: {
// +usage=Specify the exposion ports
port: [...int]
// +usage=Deprecated, the old way to specify the exposion ports
port?: [...int]
// +usage=Specify portsyou want customer traffic sent to
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=exposed node port. Only Valid when exposeType is NodePort
nodePort?: int
}]
// +usage=Specify the annotaions of the exposed service
annotations: [string]: string
annotations: [string]: string
matchLabels?: [string]: string
// +usage=Specify what kind of Service you want. options: "ClusterIP","NodePort","LoadBalancer","ExternalName"
type: *"ClusterIP" | "NodePort" | "LoadBalancer" | "ExternalName"
}

View File

@@ -17,6 +17,7 @@ spec:
// +usage=Specify the strategy for target resource to recycle
strategy: *"onAppUpdate" | "onAppDelete" | "never"
}
#ResourcePolicyRuleSelector: {
// +usage=Select resources by component names
componentNames?: [...string]
@@ -31,9 +32,12 @@ spec:
// +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=If is set, continue to execute gc when the workflow fails, by default gc will be executed only after the workflow succeeds
continueOnFailure: *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

@@ -30,6 +30,7 @@ spec:
]
}
}
legacyAPI: context.clusterVersion.minor < 19
outputs: ingress: {
if legacyAPI {
@@ -87,6 +88,7 @@ spec:
}]
}
}
parameter: {
// +usage=Specify the domain you want to expose
domain?: string
@@ -113,19 +115,20 @@ spec:
}
if context.outputs.ingress.status.loadBalancer.ingress != _|_ {
let igs = context.outputs.ingress.status.loadBalancer.ingress
let host = context.outputs.ingress.spec.rules[0].host
if igs[0].ip != _|_ {
if igs[0].host != _|_ {
if host != _|_ {
message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host + ", IP: " + igs[0].ip
}
if igs[0].host == _|_ {
if host == _|_ {
message: "Host not specified, visit the cluster or load balancer in front of the cluster with IP: " + igs[0].ip
}
}
if igs[0].ip == _|_ {
if igs[0].host != _|_ {
if host != _|_ {
message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host
}
if igs[0].host != _|_ {
if host == _|_ {
message: "Host not specified, visit the cluster or load balancer in front of the cluster"
}
}

View File

@@ -34,11 +34,13 @@ spec:
dbName: op.#ConvertString & {bt: base64.Decode(null, output.value.data["DB_NAME"])}
username: op.#ConvertString & {bt: base64.Decode(null, output.value.data["DB_USER"])}
password: op.#ConvertString & {bt: base64.Decode(null, output.value.data["DB_PASSWORD"])}
env: [
{name: "url", value: "jdbc://" + dbHost.str + ":" + dbPort.str + "/" + dbName.str + "?characterEncoding=utf8&useSSL=false"},
{name: "username", value: username.str},
{name: "password", value: password.str},
]
parameter: {
// +usage=Specify the name of the secret generated by database component
name: string

View File

@@ -29,6 +29,7 @@ spec:
]
}
}
outputs: ingress: {
apiVersion: "networking.k8s.io/v1"
kind: "Ingress"
@@ -50,6 +51,7 @@ spec:
]
}]
}
parameter: {
// +usage=Specify the domain you want to expose
domain: string

View File

@@ -29,6 +29,7 @@ spec:
]
}
}
outputs: ingress: {
apiVersion: "networking.k8s.io/v1beta1"
kind: "Ingress"
@@ -46,6 +47,7 @@ spec:
]
}]
}
parameter: {
// +usage=Specify the domain you want to expose
domain: string

View File

@@ -12,6 +12,7 @@ spec:
cue:
template: |
output: parameter.objects[0]
outputs: {
for i, v in parameter.objects {
if i > 0 {

View File

@@ -38,6 +38,7 @@ spec:
type: "ClusterIP"
}
}
patch: metadata: annotations: {
"dev.nocalhost/application-name": context.appName
"dev.nocalhost/application-namespace": context.namespace

View File

@@ -159,6 +159,7 @@ spec:
}
}
}
block: {
type: string
block_id?: string
@@ -192,18 +193,21 @@ spec:
initial_time?: string
}]
}
textType: {
type: string
text: string
emoji?: bool
verbatim?: bool
}
option: {
text: textType
value: string
description?: textType
url?: string
}
// send webhook notification
ding: op.#Steps & {
if parameter.dingding != _|_ {
@@ -233,6 +237,7 @@ spec:
}
}
}
lark: op.#Steps & {
if parameter.lark != _|_ {
if parameter.lark.url.value != _|_ {
@@ -261,6 +266,7 @@ spec:
}
}
}
slack: op.#Steps & {
if parameter.slack != _|_ {
if parameter.slack.url.value != _|_ {
@@ -289,6 +295,7 @@ spec:
}
}
}
email: op.#Steps & {
if parameter.email != _|_ {
if parameter.email.from.password.value != _|_ {

View File

@@ -28,6 +28,7 @@ spec:
disable: *false | bool
}]
}
parameter: {
// +usage=Specify the overridden component configuration.
components: [...#PatchParams]

View File

@@ -17,6 +17,7 @@ spec:
)
parameter: message: string
msg: op.#Message & {
message: parameter.message
}

View File

@@ -15,6 +15,7 @@ spec:
// +usage=Specify how to select the targets of the rule
selector: #RuleSelector
}
#RuleSelector: {
// +usage=Select resources by component names
componentNames?: [...string]
@@ -29,6 +30,7 @@ spec:
// +usage=Select resources by their names
resourceNames?: [...string]
}
parameter: {
// +usage=Specify the list of rules to control read only strategy at resource level.
// The selected resource will be read-only to the current application. If the target resource does

View File

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

View File

@@ -51,6 +51,7 @@ spec:
}
}]
}
parameter: {
// +usage=Specify the amount of cpu for requests and limits
cpu?: *1 | number | string

View File

@@ -41,6 +41,7 @@ spec:
}
// +patchStrategy=retainKeys
patch: spec: template: spec: serviceAccountName: parameter.name
_clusterPrivileges: [ if parameter.privileges != _|_ for p in parameter.privileges if p.scope == "cluster" {p}]
_namespacePrivileges: [ if parameter.privileges != _|_ for p in parameter.privileges if p.scope == "namespace" {p}]
outputs: {

View File

@@ -39,6 +39,7 @@ spec:
]
}]
}
parameter: {
// +usage=The mapping of environment variables to secret
envMappings: [string]: #KeySecret

View File

@@ -27,6 +27,7 @@ spec:
// context.namespace indicates the name of the app
name: context.name
}
parameter: {
// +usage=Declare the location to bind
placements: [...{

View File

@@ -15,6 +15,7 @@ spec:
// +usage=Specify how to select the targets of the rule
selector: [...#ResourcePolicyRuleSelector]
}
#ResourcePolicyRuleSelector: {
// +usage=Select resources by component names
componentNames?: [...string]
@@ -29,6 +30,7 @@ spec:
// +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

View File

@@ -103,6 +103,7 @@ spec:
// +usage=Instructions for assessing whether the container is in a suitable state to serve traffic.
readinessProbe?: #HealthProbe
}
#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.

View File

@@ -116,6 +116,7 @@ spec:
}
}
}
patch: spec: template: spec: {
if parameter.probes == _|_ {
// +patchKey=name
@@ -160,9 +161,11 @@ spec:
}]
}
}
parameter: *#StartupProbeParams | close({
// +usage=Specify the startup probe for multiple containers
probes: [...#StartupProbeParams]
})
errs: [ for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}]

View File

@@ -61,6 +61,7 @@ spec:
}
},
]
volumeMountsList: [
if parameter.pvc != _|_ for v in parameter.pvc {
if v.volumeMode == "Filesystem" {
@@ -107,6 +108,7 @@ spec:
}
},
]
envList: [
if parameter.configMap != _|_ for v in parameter.configMap if v.mountToEnv != _|_ {
{
@@ -145,6 +147,7 @@ spec:
}
},
]
volumeDevicesList: *[
for v in parameter.pvc if v.volumeMode == "Block" {
{
@@ -156,6 +159,7 @@ spec:
}
},
] | []
deDupVolumesArray: [
for val in [
for i, vi in volumesList {
@@ -168,6 +172,7 @@ spec:
val
},
]
patch: spec: template: spec: {
// +patchKey=name
volumes: deDupVolumesArray
@@ -182,6 +187,7 @@ spec:
}, ...]
}
outputs: {
for v in parameter.pvc {
if v.mountOnly == false {
@@ -252,6 +258,7 @@ spec:
}
}
parameter: {
// +usage=Declare pvc type storage
pvc?: [...{

View File

@@ -24,6 +24,7 @@ spec:
message: parameter.message
}
}
parameter: {
// +usage=Specify the wait duration time to resume workflow such as "30s", "1min" or "2m15s"
duration?: string

View File

@@ -15,6 +15,7 @@ spec:
// +usage=Specify how to select the targets of the rule
selector: [...#RuleSelector]
}
#RuleSelector: {
// +usage=Select resources by component names
componentNames?: [...string]
@@ -29,6 +30,7 @@ spec:
// +usage=Select resources by their names
resourceNames?: [...string]
}
parameter: {
// +usage=Specify the list of rules to control take over strategy at resource level.
// The selected resource will be able to be taken over by the current application when the resource belongs to no

View File

@@ -113,6 +113,7 @@ spec:
}
}
}
parameter: {
// +usage=Specify the labels in the workload
labels?: [string]: string
@@ -209,6 +210,7 @@ spec:
// +usage=Instructions for assessing whether the container is in a suitable state to serve traffic.
readinessProbe?: #HealthProbe
}
#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.

View File

@@ -33,6 +33,7 @@ spec:
}
},
]
volumesList: [
if parameter.storage != _|_ && parameter.storage.secret != _|_ for v in parameter.storage.secret {
{
@@ -53,6 +54,7 @@ spec:
}
},
]
deDupVolumesArray: [
for val in [
for i, vi in volumesList {
@@ -65,6 +67,7 @@ spec:
val
},
]
job: op.#Apply & {
value: {
apiVersion: "batch/v1"
@@ -99,9 +102,11 @@ spec:
}
}
}
log: op.#Log & {
source: resources: [{labelSelector: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"}]
}
fail: op.#Steps & {
if job.value.status.failed != _|_ {
if job.value.status.failed > 2 {
@@ -111,9 +116,11 @@ spec:
}
}
}
wait: op.#ConditionalWait & {
continue: job.value.status.succeeded != _|_ && job.value.status.succeeded > 0
}
parameter: {
// +usage=Specify the name of the addon.
addonName: string

View File

@@ -50,6 +50,7 @@ spec:
},
]
}
parameter: {
// +usage=Declare volumes and volumeMounts
volumes?: [...{

View File

@@ -68,6 +68,7 @@ spec:
} @step(7)
}
}
parameter: {
// +usage=Specify the webhook url
url: close({

View File

@@ -67,6 +67,7 @@ spec:
}
},
]
volumesList: [
if parameter.volumeMounts != _|_ && parameter.volumeMounts.pvc != _|_ for v in parameter.volumeMounts.pvc {
{
@@ -115,6 +116,7 @@ spec:
}
},
]
deDupVolumesArray: [
for val in [
for i, vi in volumesList {
@@ -127,6 +129,7 @@ spec:
val
},
]
output: {
apiVersion: "apps/v1"
kind: "Deployment"
@@ -284,6 +287,7 @@ spec:
}
}
}
exposePorts: [
if parameter.ports != _|_ for v in parameter.ports if v.expose == true {
port: v.port
@@ -306,6 +310,7 @@ spec:
}
},
]
outputs: {
if len(exposePorts) != 0 {
webserviceExpose: {
@@ -320,6 +325,7 @@ spec:
}
}
}
parameter: {
// +usage=Specify the labels in the workload
labels?: [string]: string
@@ -496,6 +502,7 @@ spec:
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.

View File

@@ -64,6 +64,7 @@ spec:
}
},
]
volumesList: [
if parameter.volumeMounts != _|_ && parameter.volumeMounts.pvc != _|_ for v in parameter.volumeMounts.pvc {
{
@@ -112,6 +113,7 @@ spec:
}
},
]
deDupVolumesArray: [
for val in [
for i, vi in volumesList {
@@ -124,6 +126,7 @@ spec:
val
},
]
output: {
apiVersion: "apps/v1"
kind: "Deployment"
@@ -234,6 +237,7 @@ spec:
}
}
}
parameter: {
// +usage=Which image would you like to use for your service
// +short=i
@@ -363,6 +367,7 @@ spec:
// +usage=Instructions for assessing whether the container is in a suitable state to serve traffic.
readinessProbe?: #HealthProbe
}
#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.

View File

@@ -65,10 +65,8 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-minimal --
| `controllerArgs.reSyncPeriod` | The period for resync the applications | `5m` |
| `OAMSpecVer` | OAMSpecVer is the oam spec version controller want to setup | `minimal` |
| `disableCaps` | Disable capability | `envbinding,rollout` |
| `applyOnceOnly` | Valid applyOnceOnly values: true/false/on/off/force | `off` |
| `dependCheckWait` | dependCheckWait is the time to wait for ApplicationConfiguration's dependent-resource ready | `30s` |
### KubeVela workflow parameters
| Name | Description | Value |
@@ -78,7 +76,6 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-minimal --
| `workflow.backoff.maxTime.failedState` | The max backoff time of workflow in a failed condition | `300` |
| `workflow.step.errorRetryTimes` | The max retry times of a failed workflow step | `10` |
### KubeVela controller parameters
| Name | Description | Value |
@@ -96,22 +93,28 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-minimal --
| `webhookService.port` | KubeVela webhook service port | `9443` |
| `healthCheck.port` | KubeVela health check port | `9440` |
### KubeVela controller optimization parameters
| Name | Description | Value |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `featureGates.applyOnce` | if enabled, the apply-once feature will be applied to all applications, no state-keep and no resource data storage in ResourceTracker | `false` |
### MultiCluster parameters
| Name | Description | Value |
| ----------------------------------------------------- | -------------------------------- | -------------------------------- |
| `multicluster.enabled` | Whether to enable multi-cluster | `true` |
| `multicluster.clusterGateway.replicaCount` | ClusterGateway replica count | `1` |
| `multicluster.clusterGateway.port` | ClusterGateway port | `9443` |
| `multicluster.clusterGateway.image.repository` | ClusterGateway image repository | `oamdev/cluster-gateway` |
| `multicluster.clusterGateway.image.tag` | ClusterGateway image tag | `v1.7.0` |
| `multicluster.clusterGateway.image.pullPolicy` | ClusterGateway image pull policy | `IfNotPresent` |
| `multicluster.clusterGateway.resources.limits.cpu` | ClusterGateway cpu limit | `100m` |
| `multicluster.clusterGateway.resources.limits.memory` | ClusterGateway memory limit | `200Mi` |
| `multicluster.clusterGateway.secureTLS.enabled` | Whether to enable secure TLS | `true` |
| `multicluster.clusterGateway.secureTLS.certPath` | Path to the certificate file | `/etc/k8s-cluster-gateway-certs` |
| Name | Description | Value |
| ------------------------------------------------------- | -------------------------------- | -------------------------------- |
| `multicluster.enabled` | Whether to enable multi-cluster | `true` |
| `multicluster.clusterGateway.replicaCount` | ClusterGateway replica count | `1` |
| `multicluster.clusterGateway.port` | ClusterGateway port | `9443` |
| `multicluster.clusterGateway.image.repository` | ClusterGateway image repository | `oamdev/cluster-gateway` |
| `multicluster.clusterGateway.image.tag` | ClusterGateway image tag | `v1.8.0-alpha.3` |
| `multicluster.clusterGateway.image.pullPolicy` | ClusterGateway image pull policy | `IfNotPresent` |
| `multicluster.clusterGateway.resources.requests.cpu` | ClusterGateway cpu request | `50m` |
| `multicluster.clusterGateway.resources.requests.memory` | ClusterGateway memory request | `20Mi` |
| `multicluster.clusterGateway.resources.limits.cpu` | ClusterGateway cpu limit | `500m` |
| `multicluster.clusterGateway.resources.limits.memory` | ClusterGateway memory limit | `200Mi` |
| `multicluster.clusterGateway.secureTLS.enabled` | Whether to enable secure TLS | `true` |
| `multicluster.clusterGateway.secureTLS.certPath` | Path to the certificate file | `/etc/k8s-cluster-gateway-certs` |
### Test parameters
@@ -122,7 +125,6 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-minimal --
| `test.k8s.repository` | Test k8s repository | `oamdev/alpine-k8s` |
| `test.k8s.tag` | Test k8s tag | `1.18.2` |
### Common parameters
| Name | Description | Value |

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: applicationrevisions.core.oam.dev
spec:
group: core.oam.dev
@@ -2306,6 +2306,11 @@ spec:
alias:
type: string
type: object
mode:
description: Mode is only valid for sub steps, it
defines the mode of the sub steps
nullable: true
type: string
name:
description: Name is the unique name of the workflow
step.
@@ -4168,6 +4173,11 @@ spec:
alias:
type: string
type: object
mode:
description: Mode is only valid for sub steps, it defines
the mode of the sub steps
nullable: true
type: string
name:
description: Name is the unique name of the workflow step.
type: string

View File

@@ -3,7 +3,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: vela-system/kubevela-vela-core-root-cert
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: applications.core.oam.dev
spec:
group: core.oam.dev
@@ -1068,6 +1068,11 @@ spec:
alias:
type: string
type: object
mode:
description: Mode is only valid for sub steps, it defines
the mode of the sub steps
nullable: true
type: string
name:
description: Name is the unique name of the workflow step.
type: string

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: definitionrevisions.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: healthscopes.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: policydefinitions.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: resourcetrackers.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: scopedefinitions.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: traitdefinitions.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: workflowstepdefinitions.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: workloaddefinitions.core.oam.dev
spec:
group: core.oam.dev

View File

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
controller-gen.kubebuilder.io/version: v0.11.3
name: rollouts.standard.oam.dev
spec:
group: standard.oam.dev

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