Compare commits

...

215 Commits

Author SHA1 Message Date
github-actions[bot]
360f69bea5 Fix: fix the typo error in vela top (#5983) 2023-05-12 22:42:41 +08:00
Somefive
974644ddc4 [Backport release-1.8] Chore: add e2e ci env bootstrap & remove multlcluster legacy rollout ci #5926 (#5939) 2023-05-04 16:48:14 +08:00
qiaozp
f3a00984da Fix: migrate CI to CNCF machines in release-x branch (#5952) 2023-05-04 16:32:37 +08:00
github-actions[bot]
92be5b3424 [Backport release-1.8] Fix: trait not added in Go SDK (#5951)
Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
(cherry picked from commit e9b1b63dae)

Co-authored-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-05-04 10:27:03 +08:00
github-actions[bot]
e528902bea [Backport release-1.8] Fix: install dependency is invalid for runtime addon when it's cluster arg is nil (#5935)
* Fix: install dependency is invalid for runtime addon when it's clusters arg is nil

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
(cherry picked from commit 142242a02d)

* Fix: add unit test for getDependencyArgs and checkDependencyNeedInstall

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
(cherry picked from commit c38f6e43b7)

* Fix: Simplified the checkDependencyNeedInstall func logic

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
(cherry picked from commit f038023a98)

* Fix: add comments for checkDependencyNeedInstall

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
(cherry picked from commit 1009de2fc5)

---------

Co-authored-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
2023-04-28 10:46:32 +08:00
Somefive
c3b736f753 [Backport release-1.8] Fix: multi cluster inline policy load extra definitions (#5915)
* Fix: multi cluster inline policy load extra definitions

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

* Fix: refactor readme

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-27 11:18:22 +08:00
github-actions[bot]
f343111f87 Fix: multicluster disable installation (#5925)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit 33134ff0d0)

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2023-04-26 14:02:40 +08:00
github-actions[bot]
007901f9f1 Fix: fix terminate suspending steps (#5874)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
(cherry picked from commit ecaa84ccfd)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-18 16:58:40 +08:00
github-actions[bot]
fcd721ffed fix bug if addon parameter is Empty (#5859)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
(cherry picked from commit ebc631d7cf)

Co-authored-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-04-14 17:45:57 +08:00
github-actions[bot]
37718a095d Feat: add new fields for addon metadata (#5857)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
(cherry picked from commit ed2cf3c742)

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-04-14 17:19:20 +08:00
Tianxin Dong
2ca81e037d Fix: fix the operate order in suspend & resume (#5842)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-13 14:15:29 +08:00
github-actions[bot]
33940c621a Fix: fix multi clusters bottom in vela adopt (#5837)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
(cherry picked from commit 0f5a5de6e4)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-12 13:19:37 +08:00
github-actions[bot]
705ea38158 [Backport release-1.8] Refactor: the addon dependency installation logic is accurate to the cluster (#5817)
* Refactor: the addon dependency installation logic is accurate to the cluster

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
(cherry picked from commit 5b10c3aae8)

* Fix: optimize the code based on the review

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
(cherry picked from commit 2fb4c605fc)

* Feat: add unit test for func checkDependencyNeedInstall

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
(cherry picked from commit 69d27f090c)

---------

Co-authored-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
2023-04-07 17:16:57 +08:00
github-actions[bot]
8fabbbf2de Fix: use step id to filter the log data and fix the regex (#5814)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
(cherry picked from commit 308093159f)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-07 10:40:56 +08:00
github-actions[bot]
c010d1c7f3 Fix: fix step id to name in workflow logs (#5808)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
(cherry picked from commit 6b1f57e877)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-06 14:59:18 +08:00
github-actions[bot]
856a3a636e [Backport release-1.8] Feat: compatibility on componentDefinition spec.workload.definition field (#5803)
Co-authored-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-04-06 11:54:18 +08:00
github-actions[bot]
24c33b8313 [Backport release-1.8] Fix: filter rollout created by rolling-release in vela workflow resume (#5787)
* filter rollout created by rolling-release

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

* fix golint

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

* use annotation instead trait type

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

* use annotations instead of triat type

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

* lint go import

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

---------

Co-authored-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-04-06 11:09:12 +08:00
github-actions[bot]
c3ae3fedf3 [Backport release-1.8] Feat: add mode in steps for step group (#5802)
Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-06 11:02:55 +08:00
github-actions[bot]
83962d44d9 Feat: expose trait with new ports (#5785)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
(cherry picked from commit cbe80c5f08)

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-03-31 15:57:28 +08:00
github-actions[bot]
3250b0003a [Backport release-1.8] Feat: add check prometheus metrics workflowStepDefinition (#5776)
* add metrics

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

add check metrics

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

* add check-metrics definition example

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

rename example

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

* small fix

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

* fix lint

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

* add default metrics

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

---------

Co-authored-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-03-30 11:13:24 +08:00
Somefive
024a34585a vela adopt support multi-cluster adoption (#5635) (#5755)
Signed-off-by: Basuotian <basuoluomiu@gmail.com>
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Co-authored-by: Basuotian <93654253+basuotian@users.noreply.github.com>
2023-03-29 11:51:20 +08:00
github-actions[bot]
460cdbeea6 Chore: stable the version of workflow to 0.5.0 for 1.8 release (#5765)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
(cherry picked from commit d6b3aed716)

Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-03-29 11:50:53 +08:00
github-actions[bot]
21418d2f06 Fix: vela top cannot switch the theme (#5757)
Signed-off-by: howieyuen <howieyuen@outlook.com>
(cherry picked from commit cb1c33bed1)

Co-authored-by: howieyuen <howieyuen@outlook.com>
2023-03-28 15:39:21 +08:00
github-actions[bot]
65c1bea03a [Backport release-1.8] Fix: gateway message is wrong (#5752)
Co-authored-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-03-28 09:30:06 +08:00
github-actions[bot]
17a76cc0e2 Feat: fix flacky test (#5742)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit ca4636030e)

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2023-03-27 14:53:19 +08:00
github-actions[bot]
ae6697b316 Feat: add qps for load test client (#5740)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit 54bb1af66d)

Co-authored-by: Da Yin <yd219913@alibaba-inc.com>
2023-03-27 10:03:45 +08:00
github-actions[bot]
03f582ad88 [Backport release-1.8] Feat: enhance vela adopt and refactor (#5737)
* Feat: enhance vela adopt and refactor

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

* Fix: flaky mc test

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

---------

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2023-03-24 16:24:23 +08:00
github-actions[bot]
75f8209a4c [Backport release-1.8] Feat: add sub-module to Golang SDK (#5731)
* wait to deal with go.mod

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

* seperate def and module modifier

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

* fix module import

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

* refine code

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

* remove the pointer reference in loop

generalize the language-specific argument parsing

amend tests

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

* remove focused test

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

* fix test

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

* update command usage

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

---------

Co-authored-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-03-24 11:34:16 +08:00
github-actions[bot]
3975fbcda6 [Backport release-1.8] Fix: fix vela-minimal helm chart unrecognised options (#5730)
* fix(vela-minimal): fix unrecognised options

Signed-off-by: florent.madiot.e <florent.madiot.e@thalesdigital.io>
(cherry picked from commit c9394a18a6)

* Fix(vela-minimal): make reviewable

Signed-off-by: florent.madiot.e <florent.madiot.e@thalesdigital.io>
(cherry picked from commit f4f7f96cc8)

---------

Co-authored-by: florent.madiot.e <florent.madiot.e@thalesdigital.io>
2023-03-24 11:33:47 +08:00
Somefive
80da131171 Feat: upgrade helm values (#5722)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-23 18:40:06 +08:00
dependabot[bot]
332c7e42a7 Chore: (deps): Bump github.com/go-git/go-git/v5 from 5.5.1 to 5.6.1 (#5715)
Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) from 5.5.1 to 5.6.1.
- [Release notes](https://github.com/go-git/go-git/releases)
- [Commits](https://github.com/go-git/go-git/compare/v5.5.1...v5.6.1)

---
updated-dependencies:
- dependency-name: github.com/go-git/go-git/v5
  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-03-22 13:03:14 +08:00
dependabot[bot]
7f1def40ad Chore: (deps): Bump github.com/xlab/treeprint from 1.1.0 to 1.2.0 (#5667)
Bumps [github.com/xlab/treeprint](https://github.com/xlab/treeprint) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/xlab/treeprint/releases)
- [Commits](https://github.com/xlab/treeprint/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: github.com/xlab/treeprint
  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-03-22 13:02:38 +08:00
iyear
6976b2ba0c Feat: CUE generator with type conversion (#5585)
* Feat: CUE generator with type conversion

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

* Fix: golangci-lint error

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

* Fix: add licenses

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

* Fix: go mod tidy

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

* Tests: add util unit tests

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

* Tests: add registry unit tests

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

* Fix: add util_test.go header license

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

* Tests: add tag unit tests

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

* Fix: small bugs

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

* Tests: add testdata

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

* Fix: add licenses to testdata go files

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

* Chore: modify according to FogDong

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

* Chore: remove ident '_' addition

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

* Chore: add tests and refactor files

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

* Chore: remove useless escape test and ident placeholder

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

* Chore: add more escape tests

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

* Fix: index out of range and add edge case tests

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

* Feat: support escaping separators ';' ':' ','

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

---------

Signed-off-by: iyear <ljyngup@gmail.com>
2023-03-21 15:24:29 +08:00
xingming01
4d714ed2c2 Fix: Optimize the webhook log format (#5652)
Co-authored-by: caoxingming <caoxingming@jd.com>
2023-03-21 11:38:57 +08:00
dependabot[bot]
2f6ea93272 Chore: (deps): Bump golang.org/x/oauth2 from 0.3.0 to 0.6.0 (#5693)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-21 11:33:16 +08:00
dependabot[bot]
586f0f26c1 Chore: (deps): Bump actions/setup-go from 3.5.0 to 4.0.0 (#5706) 2023-03-21 03:29:46 +00:00
dependabot[bot]
7b47fdc046 Chore: (deps): Bump actions/checkout from 3.3.0 to 3.4.0 (#5708) 2023-03-21 02:41:55 +00:00
Tianxin Dong
971f6ffe4c Fix: use logs to show errs intead of return in adopt all (#5705)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-03-21 10:41:05 +08:00
Somefive
377753d1b1 Fix: system crd validation hook should not always use the default vela system (#5709)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-21 10:16:40 +08:00
dependabot[bot]
e961f8da88 Chore: (deps): Bump github.com/spf13/cobra from 1.6.0 to 1.6.1 (#5694) 2023-03-20 02:21:38 +00:00
dependabot[bot]
3acfecc9e4 Chore: (deps): Bump golang.org/x/text from 0.7.0 to 0.8.0 (#5692) 2023-03-20 02:20:49 +00:00
Somefive
50458bc455 Feat: memory optimization via enhance informer cache (#5683) 2023-03-20 10:19:21 +08:00
Tianxin Dong
b28b165048 Chore: update workflow version to fix depends on skip (#5698)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-03-17 17:14:33 +08:00
Tianxin Dong
59fc019243 Feat: add adopt all command (#5690)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-03-17 14:46:06 +08:00
dependabot[bot]
fa8899088c Chore: (deps): Bump github.com/alibabacloud-go/tea from 1.1.19 to 1.1.20 (#5681)
Bumps [github.com/alibabacloud-go/tea](https://github.com/alibabacloud-go/tea) from 1.1.19 to 1.1.20.
- [Release notes](https://github.com/alibabacloud-go/tea/releases)
- [Commits](https://github.com/alibabacloud-go/tea/compare/v1.1.19...v1.1.20)

---
updated-dependencies:
- dependency-name: github.com/alibabacloud-go/tea
  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-03-17 13:38:52 +08:00
Somefive
b4ef7e915f Feat: add load testing app template (#5526)
* Feat: add load testing apptemplate

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

* Feat: update region template

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

* Feat: use configmap instead of secret and add cleanup script

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

* enhance readme

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-16 18:57:04 +08:00
Somefive
0bff849689 Feat: change the cluster-gateway connect mode to direct and deprecate envbinding CRD (#5631)
* Feat: upgrade helm chart values

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

* fix authentication issue

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-16 17:17:45 +08:00
dependabot[bot]
942e88cd29 Chore: (deps): Bump github.com/prometheus/client_golang (#5668)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.2 to 1.14.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.2...v1.14.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  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-03-16 10:16:30 +08:00
dependabot[bot]
23383841db Chore: (deps): Bump actions/cache from 3.2.6 to 3.3.1 (#5663)
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.6 to 3.3.1.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](69d9d449ac...88522ab9f3)

---
updated-dependencies:
- dependency-name: actions/cache
  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-03-16 10:14:16 +08:00
StevenLeiZhang
801c630c61 Fix: sample yaml of Trait storage does not work (#5679)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2023-03-16 10:00:30 +08:00
StevenLeiZhang
91bcedbf24 Fix: parameter type is conflict with Component webserice and Trait re… (#5579) 2023-03-15 20:36:00 +08:00
qiaozp
3ce7517b6b Feat: set right default value for oneOf schema if set (#5677) 2023-03-15 14:08:53 +08:00
dependabot[bot]
87f2a43bee Chore: (deps): Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 (#5666) 2023-03-15 03:06:15 +00:00
msun1996
ad23240e4e Fix: The resource topology fails to display the pods under the cronjob (#5640) (#5642)
Signed-off-by: hanzhaoyang <hanzhaoyang@jd.com>
Co-authored-by: hanzhaoyang <hanzhaoyang@jd.com>
2023-03-14 18:41:56 +08:00
Somefive
0ae82d8034 Fix: mc flaky e2e test (#5661)
* Fix: mc flaky e2e test

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

* Fix: add time for workflow rollback

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

* Fix: load-test flaky

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-13 16:53:00 +08:00
qiaozp
e8b92a5d02 fix CVE-2023-27483 (#5657)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-03-13 16:15:54 +08:00
dependabot[bot]
c08cffbc4c Chore: (deps): Bump zeebe-io/backport-action from 1.1.0 to 1.2.0 (#5622) 2023-03-13 08:01:13 +00:00
dependabot[bot]
4f24f13fd7 Chore: (deps): Bump github.com/hashicorp/hcl/v2 from 2.12.0 to 2.16.2 (#5649) 2023-03-13 07:21:25 +00:00
dependabot[bot]
1159eef264 Chore: (deps): Bump github.com/emicklei/go-restful/v3 (#5650) 2023-03-13 07:21:07 +00:00
Somefive
d41c3ec0e7 Fix: cve-2022-4203 (#5658)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-13 15:07:48 +08:00
suwliang3
54311b9d06 Fix: add addon registry (#5646)
* Fix: add addon registry

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

* Fix: modify edit errors

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

---------

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>
2023-03-13 14:12:32 +08:00
barnettZQG
50622ababc Chore: move the API server to the VelaUX repository (#5636)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-13 13:53:35 +08:00
wyike
a36eb4f2e2 Fix: loading definitions if lack in the revision when calculate dispatch stage of trait. (#5644)
* small fix for dispatch stage

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

revert useless commit

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

small fix

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

* add test case

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

---------

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-03-13 11:22:44 +08:00
Somefive
4edb21782f Feat: add feature gate to allow disbale cluster watch at the start of vela-core (#5632)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-13 11:17:15 +08:00
qiaozp
6704e9794a Fix: push tags anyway in new release while syncing api and sdk (#5641) 2023-03-09 14:03:24 +08:00
qiaozp
07a05c419f Feat: sync sdk automatically (#5630) 2023-03-09 10:18:08 +08:00
barnettZQG
79f1d5cb03 Chore: optimize the package dependencies (#5596)
* Chore: optimize the package dependces

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

* Fix: the code style

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

* Fix: remove the repetitive context

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

* Fix: change the context key

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

* Fix: Optimize the e2e test case

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

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-07 16:19:37 +08:00
qiaozp
3f53c26bc8 Feat: enhance the SDK, fix generating bugs (#5586) 2023-03-07 15:12:54 +08:00
Tianxin Dong
388056fda0 Fix: stores workflow status in revison if it is restarted (#5604)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-03-07 14:13:56 +08:00
dependabot[bot]
c4fbc38ff4 Chore: (deps): Bump open-cluster-management.io/api from 0.7.0 to 0.10.0 (#5574)
Bumps [open-cluster-management.io/api](https://github.com/open-cluster-management-io/api) from 0.7.0 to 0.10.0.
- [Release notes](https://github.com/open-cluster-management-io/api/releases)
- [Commits](https://github.com/open-cluster-management-io/api/compare/v0.7.0...v0.10.0)

---
updated-dependencies:
- dependency-name: open-cluster-management.io/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-03-07 11:50:43 +08:00
Somefive
d60bb6224d Feat: optimize empty patch request (#5600)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-07 11:11:06 +08:00
dependabot[bot]
36128671c1 Chore: (deps): Bump dawidd6/action-homebrew-bump-formula from 3.8.3 to 3.9.0 (#5623)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-07 09:52:11 +08:00
dependabot[bot]
1762f7a294 Chore: (deps): Bump actions/cache from 3.2.5 to 3.2.6 (#5621) 2023-03-06 16:11:54 +00:00
zhaohuiweixiao
6fa0d98547 Fix: render addon application checkDeployClusters invalid (#5555)
* Fix: render addon application checkDeployClusters invalid

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

* Feat: add getClusters test logic

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

---------

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
2023-03-06 19:36:59 +08:00
Somefive
91638eba65 Fix: make read-only object not found error more clear (#5614)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-06 13:18:05 +08:00
Somefive
e7dad3c9be Fix: replication example componentdefinition miss workload field for webhook validation (#5615)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-06 13:17:48 +08:00
dependabot[bot]
ce749dd6bb Chore: (deps): Bump github.com/gdamore/tcell/v2 (#5583)
Bumps [github.com/gdamore/tcell/v2](https://github.com/gdamore/tcell) from 2.4.1-0.20210905002822-f057f0a857a1 to 2.6.0.
- [Release notes](https://github.com/gdamore/tcell/releases)
- [Commits](https://github.com/gdamore/tcell/commits/v2.6.0)

---
updated-dependencies:
- dependency-name: github.com/gdamore/tcell/v2
  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-03-06 13:04:02 +08:00
Somefive
76a8d13a37 Feat: remove loop reduction & filter unnecessary apprev update (#5598)
* Feat: remove loop reduction

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

* Feat: filter unnecessary rev update

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

* Fix: add retry for multicluster e2e test

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-03 20:05:10 +08:00
caiqi1111
2f7b8b5ba8 Fix: length of name should be less than 32 (#5547)
* Fix: length of name should be less than 32

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>

* Fix: length of name should be less than 32

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>

---------

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>
2023-03-03 16:35:02 +08:00
Somefive
0d27a412cc Feat: support direct connection mode for cluster gateway (#5595)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-03 10:29:15 +08:00
Somefive
4596aac043 Feat: upgrade cluster-gateway to use v1.8.0-alpha.3 & fix time metrics bug (#5593)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-02 14:49:48 +08:00
dependabot[bot]
5ed67d7bec Chore: (deps): Bump go.mongodb.org/mongo-driver from 1.11.1 to 1.11.2 (#5584) 2023-03-01 07:53:28 +00:00
JohnJan
c640dd24c7 Fix: add test for InterfaceSlice (#5590)
Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-03-01 15:34:26 +08:00
Somefive
65215c00e4 Feat: refactor prometheus metrics (#5592)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-01 14:32:35 +08:00
Siege Lion
0ace2033ba Feat: add more information about resource in vela top's topology view (#5577)
* Feat: add application detail view

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: small fix

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add data source

Signed-off-by: HanMengnan <1448189829@qq.com>

---------

Signed-off-by: HanMengnan <1448189829@qq.com>
2023-03-01 13:39:33 +08:00
Tianxin Dong
41844eb461 Feat: add op.#Suspend and suspending phase in step (#5567) 2023-03-01 10:59:31 +08:00
JohnJan
7f54ca96e7 Fix: the array type cannot be converted to interface type (#5578)
* Fix: the array type cannot be converted to interface type

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

* Fix: the array type cannot be converted to interface type

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

* Fix: the array type cannot be converted to interface type

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

* Fix: the array type cannot be converted to interface type

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

---------

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-03-01 09:42:05 +08:00
Frank Zhao
f454ec34e4 docs: add leaderboard badge (#5581)
Signed-off-by: frank-zsy <syzhao1988@126.com>

Add contribution leaderboard badge to README.
2023-02-28 11:55:48 +08:00
dependabot[bot]
c8d4bfb150 Chore: (deps): Bump github.com/tidwall/gjson from 1.9.3 to 1.14.4 (#5576)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-27 20:30:11 +08:00
Somefive
c0234888a6 Feat: optimize list op (#5572)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-27 19:04:57 +08:00
Somefive
af10f11225 Feat: default enable multi-stage apply (#5530)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-27 17:38:09 +08:00
Siege Lion
c350cc3a23 Feat: Add Request and Limit metrics to vela status --metrics (#5546)
* Feat: Add Request and Limit metrics to vela status --metrics

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix function spec and const variable

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix logic of loading pod metrics

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: small fix

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: optimize  function structure

Signed-off-by: HanMengnan <1448189829@qq.com>

---------

Signed-off-by: HanMengnan <1448189829@qq.com>
2023-02-27 16:31:38 +08:00
msun1996
93a56c84c0 Fix: The resource topology fails to display the pods under the job (#5566) (#5568)
Signed-off-by: hanzhaoyang <hanzhaoyang@jd.com>
Co-authored-by: hanzhaoyang <hanzhaoyang@jd.com>
2023-02-27 16:28:50 +08:00
caiqi1111
1e7edabdab Fix: createTime and LoginTime wrong for login information (#5535) 2023-02-27 10:07:48 +08:00
zhanghw0354
4ad0c7a9c0 Docs: correct the doc of recycle application env api (#5537)
* correct the doc of recycle application env api

Signed-off-by: zhanghw0354 <zhanghaiwen_yewu@cmss.chinamobile.com>

* Feat: SDK generating framework (#5431)

Signed-off-by: zhanghw0354 <zhanghaiwen_yewu@cmss.chinamobile.com>

---------

Signed-off-by: zhanghw0354 <zhanghaiwen_yewu@cmss.chinamobile.com>
Co-authored-by: qiaozp <47812250+chivalryq@users.noreply.github.com>
2023-02-27 10:00:39 +08:00
Echo
f846e25517 Fix: swagger DateType (#5563)
Signed-off-by: yueyongyue <yueyongyue@sina.cn>
2023-02-27 09:48:18 +08:00
dependabot[bot]
0d273b0ccb Chore: (deps): Bump golang.org/x/crypto from 0.4.0 to 0.6.0 (#5527)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.4.0 to 0.6.0.
- [Release notes](https://github.com/golang/crypto/releases)
- [Commits](https://github.com/golang/crypto/compare/v0.4.0...v0.6.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  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-02-25 13:30:05 +08:00
dependabot[bot]
282bb4e977 Chore: (deps): Bump zeebe-io/backport-action from 0.0.9 to 1.1.0 (#5543)
Bumps [zeebe-io/backport-action](https://github.com/zeebe-io/backport-action) from 0.0.9 to 1.1.0.
- [Release notes](https://github.com/zeebe-io/backport-action/releases)
- [Commits](2ee900dc92...5984bcd72f)

---
updated-dependencies:
- dependency-name: zeebe-io/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-25 13:29:36 +08:00
dependabot[bot]
0927700fcf Chore: (deps): Bump supercharge/mongodb-github-action (#5540)
Bumps [supercharge/mongodb-github-action](https://github.com/supercharge/mongodb-github-action) from 1.8.0 to 1.9.0.
- [Release notes](https://github.com/supercharge/mongodb-github-action/releases)
- [Changelog](https://github.com/supercharge/mongodb-github-action/blob/main/CHANGELOG.md)
- [Commits](538a4d2a10...d26215f71b)

---
updated-dependencies:
- dependency-name: supercharge/mongodb-github-action
  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-02-25 13:29:01 +08:00
dependabot[bot]
597172ad35 Chore: (deps): Bump thehanimo/pr-title-checker from 1.3.5 to 1.3.7 (#5541)
Bumps [thehanimo/pr-title-checker](https://github.com/thehanimo/pr-title-checker) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/thehanimo/pr-title-checker/releases)
- [Commits](https://github.com/thehanimo/pr-title-checker/compare/v1.3.5...v1.3.7)

---
updated-dependencies:
- dependency-name: thehanimo/pr-title-checker
  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-02-25 13:27:57 +08:00
dependabot[bot]
13761891af Chore: (deps): Bump github.com/prometheus/client_model (#5557) 2023-02-24 12:28:19 +00:00
dependabot[bot]
9ecfa55056 Chore: (deps): Bump docker/setup-buildx-action from 2.2.1 to 2.4.1 (#5542)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-22 17:27:22 +08:00
dependabot[bot]
41cf74e6ae Chore: (deps): Bump github.com/onsi/ginkgo/v2 from 2.8.0 to 2.8.3 (#5544)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-22 17:25:44 +08:00
Ramesh Krishna
0f6c89b7f9 Feat: update version of terraform-controller to v0.7.10. (#5550) 2023-02-22 10:27:28 +08:00
qiaozp
8ff77c4486 Feat: SDK generating framework (#5431) 2023-02-21 15:54:44 +08:00
StevenLeiZhang
b1fc313519 Fix: vela top can not show Containers and Pod metrics, when the Component is deployed to member cluster (#5534)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2023-02-20 14:05:47 +08:00
Tianxin Dong
3a8746e07f Feat: support resume a specific suspend step in workflow (#5505)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-02-18 17:04:17 +08:00
dependabot[bot]
a37b865a61 Chore: (deps): Bump github.com/alibabacloud-go/cs-20151215/v3 (#5529) 2023-02-17 12:01:02 +00:00
Somefive
46320e93dc Feat: expose cluster gateway metrics (#5523)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-17 16:01:16 +08:00
dependabot[bot]
a1840d5290 Chore: (deps): Bump github.com/containerd/containerd (#5520) 2023-02-17 03:38:27 +00:00
dependabot[bot]
80d149a8d8 Chore: (deps): Bump github.com/google/go-containerregistry from 0.9.0 to 0.13.0 (#5519)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-17 10:44:24 +08:00
dependabot[bot]
d90cfa5cd2 Chore: (deps): Bump github.com/alibabacloud-go/darabonba-openapi/v2 from 2.0.0 to 2.0.4 (#5518)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-16 19:03:37 +08:00
suwliang3
e2ab8aad48 Fix: delete the secret of the cluster (#5497)
* Fix: delete the secret of the cluster

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

* Fix: add test

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

* Fix: modify error

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

* Fix: solve check-diff

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

* Fix: modify test

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

---------

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>
2023-02-16 14:03:47 +08:00
Afzal
39c24cfdb9 Fix: removes default parameter name for terraform provider (#5468)
Co-authored-by: afzalbin64 <afzal442@gmail.com>
Fixes https://github.com/kubevela/kubevela/issues/5427
2023-02-16 13:52:51 +08:00
Somefive
f008411f4a Feat: add load testing script (batch apply applications) (#5506)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-16 13:34:25 +08:00
dependabot[bot]
7d52ceadc8 Chore: (deps): Bump github.com/openkruise/kruise-api from 1.1.0 to 1.3.0 (#5510) 2023-02-16 03:58:29 +00:00
dependabot[bot]
874cd73850 Chore: (deps): Bump github.com/containerd/containerd (#5511)
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.6.12 to 1.6.17.
- [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.6.12...v1.6.17)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  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-02-16 11:49:37 +08:00
wyike
319b5c2de9 Feat: The vela-apiserver supports displaying chart values stored in the OCI registry (#5458)
* support helm chart values

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

rebase

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

no lint

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

fix lint error

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

add test and deprecated API

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

fix url bug

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

fix tests panic

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

fix tests

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

* fix golint

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

* return values.yaml

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

* fix test

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

* fix return values

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

* add multiple valeus yaml in

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

* add old interface back

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

* fix golint

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

fix test

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

---------

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-02-15 13:59:25 +08:00
qiaozp
57cd4ceb7e Fix: read-only definition in cue spec (#5498) 2023-02-15 11:35:10 +08:00
dependabot[bot]
03943752de Chore: (deps): Bump github.com/xanzy/go-gitlab from 0.60.0 to 0.80.0 (#5503)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-15 11:25:17 +08:00
Somefive
e209b2835d Feat: support parallelize-state-keep (#5504)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-15 10:00:51 +08:00
dependabot[bot]
5c9e109155 Chore: (deps): Bump sigs.k8s.io/kind from 0.9.0 to 0.17.0 (#5502)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-14 21:25:58 +08:00
Siege Lion
059f248e2b Feat: add cli command vela metrics to display resource number and resource status (#5479)
* Feat: add command vela metrics

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: add printer

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: small fix
Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add cli tips

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: remove metrics command

Signed-off-by: HanMengnan <1448189829@qq.com>

---------

Signed-off-by: HanMengnan <1448189829@qq.com>
2023-02-14 13:51:35 +08:00
qiaozp
48db981db2 Chore: add codeowner (#5496)
* Chore: add codeowner

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

* finer-grained permission

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

* backup

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

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-02-14 13:50:53 +08:00
Somefive
c222862b32 Fix: pprof addr checked before parsed (#5495)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-14 11:33:17 +08:00
dependabot[bot]
30278993d9 Chore: (deps): Bump k8s.io/klog/v2 from 2.70.1 to 2.90.0 (#5466)
Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.70.1 to 2.90.0.
- [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.70.1...v2.90.0)

---
updated-dependencies:
- dependency-name: k8s.io/klog/v2
  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-02-14 11:27:35 +08:00
dependabot[bot]
345b17a534 Chore: (deps): Bump github.com/fatih/color from 1.13.0 to 1.14.1 (#5453)
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.13.0 to 1.14.1.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.13.0...v1.14.1)

---
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-02-14 10:00:08 +08:00
dependabot[bot]
53842dc5c5 Chore: (deps): Bump goreleaser/goreleaser-action from 4.1.1 to 4.2.0 (#5490)
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 4.1.1 to 4.2.0.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](9754a253a8...f82d6c1c34)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  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-02-14 09:49:31 +08:00
dependabot[bot]
a4dfe30b4c Chore: (deps): Bump github.com/emicklei/go-restful-openapi/v2 (#5440)
Bumps [github.com/emicklei/go-restful-openapi/v2](https://github.com/emicklei/go-restful-openapi) from 2.3.0 to 2.9.1.
- [Release notes](https://github.com/emicklei/go-restful-openapi/releases)
- [Changelog](https://github.com/emicklei/go-restful-openapi/blob/v2/CHANGES.md)
- [Commits](https://github.com/emicklei/go-restful-openapi/compare/v2.3.0...v2.9.1)

---
updated-dependencies:
- dependency-name: github.com/emicklei/go-restful-openapi/v2
  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-02-14 09:48:50 +08:00
dependabot[bot]
7397936edc Chore: (deps): Bump github.com/deckarep/golang-set from 1.7.1 to 1.8.0 (#5454)
Bumps [github.com/deckarep/golang-set](https://github.com/deckarep/golang-set) from 1.7.1 to 1.8.0.
- [Release notes](https://github.com/deckarep/golang-set/releases)
- [Commits](https://github.com/deckarep/golang-set/compare/v1.7.1...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/deckarep/golang-set
  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-02-13 19:48:37 +08:00
dependabot[bot]
cb5fa0c122 Chore: (deps): Bump actions/github-script from 6.3.3 to 6.4.0 (#5494)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.3.3 to 6.4.0.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](d556feaca3...98814c53be)

---
updated-dependencies:
- dependency-name: actions/github-script
  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-02-13 19:42:43 +08:00
dependabot[bot]
8946fcf045 Chore: (deps): Bump actions/cache from 3.0.11 to 3.2.5 (#5493)
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.11 to 3.2.5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](9b0c1fce7a...6998d139dd)

---
updated-dependencies:
- dependency-name: actions/cache
  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-02-13 19:42:20 +08:00
dependabot[bot]
8992bdf15a Chore: (deps): Bump ossf/scorecard-action from 2.1.0 to 2.1.2 (#5492)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.0 to 2.1.2.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](937ffa90d7...e38b1902ae)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  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-02-13 19:41:54 +08:00
dependabot[bot]
0f32ed9197 Chore: (deps): Bump actions/checkout from 3.2.0 to 3.3.0 (#5491)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](755da8c3cf...ac59398561)

---
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-02-13 19:41:37 +08:00
Somefive
930ead942e Fix: recover application watcher when sharding disabled (#5488)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-13 16:57:59 +08:00
qiaozp
22cb57d3e7 Feat: add cloud resource data passing KEP (#5489)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-02-13 15:50:56 +08:00
qiaozp
ff05180cb9 Fix: apply-terraform-provider and container-image definition (#5485)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-02-13 11:08:04 +08:00
Vasco Lameiras
0d61e7825e Fix: apiVersion of CronJob for 1.25+ clusters (#5480)
Signed-off-by: Vasco Lameiras <lameiras@gmail.com>
2023-02-11 15:27:05 +08:00
Charlie Chiang
762667ad71 Fix: use correct helm value when setting apprev compression (#5477)
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2023-02-10 19:17:07 +08:00
StevenLeiZhang
98e04eba10 Feat: need podAntiAffinity for vela pods, in order to make kubevela high availability (#5465)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2023-02-10 16:30:30 +08:00
Tianxin Dong
4a16b2f6fe Feat: add category for workflow step definition (#5471)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-02-10 14:23:04 +08:00
Somefive
7f7814851b Fix: pod view invalid cue for special pod output (#5472)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-10 13:04:15 +08:00
Somefive
1d62ab648f Feat: enhance expose trait and adopt (#5470)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-10 11:29:24 +08:00
Jianbo Sun
c2de316eae Chore: fix krew release with new binary format for .exe (#5459)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-02-08 21:54:41 +08:00
Somefive
4a6f98da27 Fix: expose trait load balance cue check bug (#5460)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-08 20:48:55 +08:00
qiaozp
6dc9dda0d4 Fix: stop sending update to brew and krew if alpha version (#5451)
* Fix: stop sending update to brew and krew if alpha version

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

* add rc

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

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-02-08 16:27:03 +08:00
Somefive
a31a66758c Fix: suppress klog logs output for vela top (#5448) 2023-02-08 15:48:44 +08:00
dependabot[bot]
4ebbfb171e Chore: (deps): Bump go.mongodb.org/mongo-driver from 1.5.1 to 1.11.1 (#5443)
Bumps [go.mongodb.org/mongo-driver](https://github.com/mongodb/mongo-go-driver) from 1.5.1 to 1.11.1.
- [Release notes](https://github.com/mongodb/mongo-go-driver/releases)
- [Commits](https://github.com/mongodb/mongo-go-driver/compare/v1.5.1...v1.11.1)

---
updated-dependencies:
- dependency-name: go.mongodb.org/mongo-driver
  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-02-08 14:53:40 +08:00
dependabot[bot]
2f2371deb2 Chore: (deps): Bump github.com/gorilla/websocket from 1.4.2 to 1.5.0 (#5437)
Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.4.2 to 1.5.0.
- [Release notes](https://github.com/gorilla/websocket/releases)
- [Commits](https://github.com/gorilla/websocket/compare/v1.4.2...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/gorilla/websocket
  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-02-08 14:52:33 +08:00
Somefive
bde4ebb32e Fix: use get before create or update (#5444)
* Fix: use get before create or update

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

* Fix: ignore resource not found error when manage privileges for target

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-08 14:49:58 +08:00
Jianbo Sun
c12bf436a0 Chore: refine readme with more featrues (#5447)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-02-08 14:47:30 +08:00
qiaozp
5dda2d58d7 Fix: simplify notification parameters (#5445) 2023-02-08 13:42:15 +08:00
dependabot[bot]
c0c1f6fdbb Chore: (deps): Bump github.com/onsi/ginkgo/v2 from 2.1.6 to 2.8.0 (#5441)
Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.1.6 to 2.8.0.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/ginkgo/compare/v2.1.6...v2.8.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
  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-02-07 17:16:02 +08:00
dependabot[bot]
fa7218f70a Chore: (deps): Bump actions/upload-artifact from 3.1.1 to 3.1.2 (#5435)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](83fd05a356...0b7f8abb15)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  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-02-07 16:22:55 +08:00
dependabot[bot]
515504466c Chore: (deps): Bump github.com/gertd/go-pluralize from 0.1.7 to 0.2.1 (#5438)
Bumps [github.com/gertd/go-pluralize](https://github.com/gertd/go-pluralize) from 0.1.7 to 0.2.1.
- [Release notes](https://github.com/gertd/go-pluralize/releases)
- [Commits](https://github.com/gertd/go-pluralize/compare/v0.1.7...v0.2.1)

---
updated-dependencies:
- dependency-name: github.com/gertd/go-pluralize
  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-02-07 13:52:50 +08:00
dependabot[bot]
eba8b8afa0 Chore: (deps): Bump actions/setup-node from 3.5.1 to 3.6.0 (#5434)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.5.1 to 3.6.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](8c91899e58...64ed1c7eab)

---
updated-dependencies:
- dependency-name: actions/setup-node
  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-02-07 13:50:46 +08:00
dependabot[bot]
1ce1fc47ec Chore: (deps): Bump docker/build-push-action from 3.2.0 to 4.0.0 (#5433)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.2.0 to 4.0.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](c56af95754...3b5e8027fc)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-07 13:49:35 +08:00
dependabot[bot]
996e55de04 Chore: (deps): Bump github.com/coreos/go-oidc (#5439)
Bumps [github.com/coreos/go-oidc](https://github.com/coreos/go-oidc) from 2.1.0+incompatible to 2.2.1+incompatible.
- [Release notes](https://github.com/coreos/go-oidc/releases)
- [Commits](https://github.com/coreos/go-oidc/compare/v2.1.0...v2.2.1)

---
updated-dependencies:
- dependency-name: github.com/coreos/go-oidc
  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-02-07 13:48:38 +08:00
dependabot[bot]
232a387d67 Chore: (deps): Bump golangci/golangci-lint-action from 3.3.0 to 3.4.0 (#5436)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](07db5389c9...08e2f20817)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  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-02-07 13:46:35 +08:00
dependabot[bot]
ba0173fdd6 Chore: (deps): Bump rajatjindal/krew-release-bot from 0.0.38 to 0.0.43 (#5432)
Bumps [rajatjindal/krew-release-bot](https://github.com/rajatjindal/krew-release-bot) from 0.0.38 to 0.0.43.
- [Release notes](https://github.com/rajatjindal/krew-release-bot/releases)
- [Changelog](https://github.com/rajatjindal/krew-release-bot/blob/master/.goreleaser.yml)
- [Commits](3320c0b546...92da038bbf)

---
updated-dependencies:
- dependency-name: rajatjindal/krew-release-bot
  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-02-07 13:46:08 +08:00
Somefive
e2f95e065a Feat: update sharding using pkg (#5430)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-07 11:12:40 +08:00
Echo
7694519fb9 Fix: dingding notification message.text.content (#5424)
* Fix: dingding notification message.text.content

Signed-off-by: yueyongyue <yueyongyue@sina.cn>
2023-02-06 19:13:42 +08:00
Jianbo Sun
46d762fd95 Create dependabot.yml (#5423)
Signed-off-by: Jianbo Sun jianbo.sjb@alibaba-inc.com
2023-02-06 16:39:13 +08:00
Somefive
b7e0cd86be Feat: add deploy inline policy and support loading definitions when lack in the revision (#5416)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-06 15:58:44 +08:00
Tianxin Dong
6324c16a68 Chore: update cue to v0.5.0-beta.5 (#5421)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-02-06 13:36:08 +08:00
fsl
3a3def1f42 Fix: update CVE-2022-3996 vuln (#5417)
Signed-off-by: fengshunli <1171313930@qq.com>
2023-02-04 20:53:17 +08:00
Karanjot Singh
c9d6bfef42 Fix: Add confirmation prompt for vela adopt --apply with existing app name (#5376)
* Add confirmation prompt for vela adopt --apply with existing app name

Signed-off-by: Karanjot Singh <drquark@duck.com>

* Added changes according to the review

Signed-off-by: Karanjot Singh <drquark@duck.com>

* Fixed Userinput and used loadremoteApplication

Signed-off-by: Karanjot Singh <drquark@duck.com>

minor fixes

Signed-off-by: Karanjot Singh <drquark@duck.com>

used loadRemoteApplication

Signed-off-by: Karanjot Singh <drquark@duck.com>

Minor Fix

Signed-off-by: Karanjot Singh <drquark@duck.com>

Minor Fix

Signed-off-by: Karanjot Singh <drquark@duck.com>

Minor Fix

Signed-off-by: Karanjot Singh <drquark@duck.com>

Minor Fix

Signed-off-by: Karanjot Singh <drquark@duck.com>

Minor Fix

Signed-off-by: Karanjot Singh <drquark@duck.com>

Minor fix

Signed-off-by: Karanjot Singh <drquark@duck.com>

Minor fix

Signed-off-by: Karanjot Singh <drquark@duck.com>

* Used f.Client().Get method

Signed-off-by: Karanjot Singh <drquark@duck.com>

minor fix

Signed-off-by: Karanjot Singh <drquark@duck.com>

minor fix

Signed-off-by: Karanjot Singh <drquark@duck.com>

* Changed bool to False

Signed-off-by: Karanjot Singh <drquark@duck.com>

---------

Signed-off-by: Karanjot Singh <drquark@duck.com>
2023-02-03 18:01:35 +08:00
huaxk
8ec8bd9390 Fix: multiple initialization containers are not supported in traits (#5110) (#5413)
Signed-off-by: huaxk <huaxk@163.com>
2023-02-03 15:57:05 +08:00
Somefive
ce63df6b26 Feat: enhance health check to support bypass component check and add parameter to context (#5412)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-03 15:49:13 +08:00
JohnJan
47b027f328 Fix: sync project from app crd to velaux (#5403)
* Fix: sync project from app crd to velaux

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

* Fix: sync project from app crd to velaux

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

* Fix: sync project from app crd to velaux

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

* Fix: sync project from app crd to velaux

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

* Fix: sync project from app crd to velaux

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

* Fix: sync project from app crd to velaux

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

---------

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-02-02 15:30:18 +08:00
wyike
1b993ffcc9 fix bugs of specified addonName (#5404)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-02-01 16:41:50 +08:00
Somefive
cca8338832 Fix: ignore validation webhook for ref-objects typed component (#5397)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-01 16:00:38 +08:00
Somefive
a38bbc72cf Fix: skip last-applied-configuration error for threewaymergepatch (#5402)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-01 15:58:57 +08:00
qiaozp
17bff50005 Fix: longer releaser timeout (#5399)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-02-01 13:57:09 +08:00
Basuotian
27177bbc38 Fix: use the namespace specified in the resource if -n is not s… (#5379)
* fix #5368, use the namespace specified in the resource if -n is not specified

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

* add default namespace for the case missing namespace in resourceRef

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

* add test case

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

---------

Signed-off-by: Basuotian <basuoluomiu@gmail.com>
2023-01-31 20:02:05 +08:00
fsl
2fb17cd159 Fix: update package dependencies (#5388)
Signed-off-by: fengshunli <1171313930@qq.com>
2023-01-31 18:31:29 +08:00
barnettZQG
df1fe1dedd Feat: add the updating the application trigger API (#5382)
* Feat: add the updating the application trigger API

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

* Fix: change the test case

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

* Fix: imported more than once

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

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-31 17:11:21 +08:00
Jianbo Sun
66dd2a70b7 Fix: aligin config create to be managed by apps with Dispatch function (#5384)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-01-31 16:55:37 +08:00
suwliang3
647fdf89f6 Feat: add the func of additionalInfo for workload (#5325)
* Fix: create default trait for webservice

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

* Feat: add the func of additionalInfo for workload

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

* modify podAdditionalInfo

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

---------

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>
2023-01-31 13:42:32 +08:00
qiaozp
f5e9e9393a Fix: rework on apisrever e2e test covergae (#5385)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-01-31 13:04:31 +08:00
Somefive
9efbb72850 Feat: support sharding in controller (#5360)
* Feat: bootstrap sharding

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

* Chore: refactor end-e2e-core-shards script

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-01-31 13:03:29 +08:00
Tianxin Dong
951fd83461 Chore: update workflow version to fix panic (#5383)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-31 10:56:46 +08:00
qiaozp
f9e8f4222f Fix: replace homemade release script with goreleaser (#5380)
Fixes https://github.com/kubevela/kubevela/issues/5347
2023-01-31 10:08:09 +08:00
barnettZQG
c52cd98713 Fix: failed to create the record when rollbacking the application (#5377)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-30 18:56:50 +08:00
Somefive
f733d74647 Feat: upgrade cluster gateway to 1.7.0 (#5354)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-01-18 11:07:13 +08:00
Tianxin Dong
250824bf05 Feat: add workflow step scope in doc gen (#5351)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-17 16:08:38 +08:00
Stephen Ni
59e5d292b4 Docs: fix README.md ad-hoc (#5345)
Signed-off-by: nisiyong <stephen.ni@outlook.com>

Signed-off-by: nisiyong <stephen.ni@outlook.com>
2023-01-17 10:35:37 +08:00
Somefive
b342ab0f86 Feat: vela cluster export config (#5336)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-01-16 18:03:38 +08:00
Somefive
9dc102021e Feat: remove useless storage driver (#5350)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-01-16 18:03:04 +08:00
Tianxin Dong
9304315972 Fix: delete example url in definitions that refer to workflowrun example (#5344)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-16 16:24:08 +08:00
gökhan
4ec9214c79 Feat: reuse same logic for cluster labels (#5346)
Issue: https://github.com/kubevela/kubevela/issues/5171

Signed-off-by: Gokhan Karadas <gokhan.karadas@trendyol.com>

Signed-off-by: Gokhan Karadas <gokhan.karadas@trendyol.com>
Co-authored-by: Gokhan Karadas <gokhan.karadas@trendyol.com>
2023-01-16 15:46:42 +08:00
ZhaoweiWang
5289bd9817 fix: fix --cluster when addon enable (#5332)
Signed-off-by: zhaowei.wang <zhaowei.wang@metabit-trading.com>

Signed-off-by: zhaowei.wang <zhaowei.wang@metabit-trading.com>
Co-authored-by: zhaowei.wang <zhaowei.wang@metabit-trading.com>
2023-01-13 17:04:33 +08:00
Tianxin Dong
5158fcf6c1 Fix: optimize skip reconcile and expose error if the traits patch an invalid workload like terraform (#5334)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-13 17:04:22 +08:00
Tianxin Dong
9ab6fe4188 Feat: upgrade the workflow version to v0.4.0 (#5335)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-13 16:56:21 +08:00
Somefive
1e15e27c8c Fix: conflict while using gc policy and shared-resource policy concurrently (#5330)
* Fix: conflict while using gc policy and shared-resource policy concurrently

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

* Fix: github ci

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

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-01-13 15:51:15 +08:00
barnettZQG
df3f134f12 Fix: maintain compatibility with old project data (#5328)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-13 13:55:32 +08:00
StevenLeiZhang
5ec3bd5ef7 Feat: need one Trait to set Rollout strategy of Workload (#5257)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>

Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2023-01-12 17:18:15 +08:00
hnd4r7
cd5ef33951 velaql support indexing into exported array field (#5320)
Signed-off-by: hnd4r7 <307365651@qq.com>

Signed-off-by: hnd4r7 <307365651@qq.com>
2023-01-12 10:12:38 +08:00
Girish
5136269c6f Fix typo in the long cli description of vela system command (#5321) 2023-01-12 10:08:20 +08:00
barnettZQG
fbaea02408 Fix: the developer user can't load the definition (#5317)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-11 18:27:56 +08:00
wyike
c4f3026065 small optimzie for addon (#5316)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

name the compoennt

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

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-01-11 16:10:46 +08:00
Tianxin Dong
19a7f4e05e Fix: fix permissions for backport in commands (#5308)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-11 14:54:28 +08:00
Xunzhuo
51b8d0c8ce fix: errorMsg when uninstall vela (#5304)
Signed-off-by: bitliu <bitliu@tencent.com>

Signed-off-by: bitliu <bitliu@tencent.com>
2023-01-11 14:47:57 +08:00
JohnJan
59e8b88d0a Fix: create a config with the same name reported an incorrect error (#5270)
* Fix: create a config with the same name reported an incorrect error

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

* Fix: create a config with the same name reported an incorrect error

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

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-01-11 14:23:41 +08:00
barnettZQG
f7d34cbe8a Feat: enhance the application synchronizer (#5299)
* Feat: enhance the application synchronizer

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

* Fix: e2e test case

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

* Fix: the unit test case

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

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-11 14:20:47 +08:00
cezhang
1ce5c6d8ea Feat: vela dry-run render results should be affected by override policy and deploy workflowstep (#4815)
* [Feature] vela dry-run render results should be affected by override policy and deploy workflowstep

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

* multiple input files support; policy,workflow support; new flag: merge orphan policy or workflow

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

* add more tests

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

* fix comment issues

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

* add tests

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

* fix e2e

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

* fix tests

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

Signed-off-by: cezhang <c1zhang.dev@gmail.com>
2023-01-11 13:52:49 +08:00
old prince
bee732b107 Fix: Index structure map[string]string,Mongo resulting in inconsistent results obtained by filtering non-string type by index. (#5274)
Signed-off-by: old.prince <di7zhang@gmail.com>

Signed-off-by: old.prince <di7zhang@gmail.com>
2023-01-11 13:05:26 +08:00
wyike
ff802ad2c5 Fix: more explicit error when addon package hasn't a metadata.yaml (#5298)
* more explicit error when addon package hasn't a metadata.yaml

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

fix checkdiff

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

* fix commets

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

* fix test

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

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-01-11 11:45:41 +08:00
Somefive
332b48e39b Chore: vela delete doc (#5301) 2023-01-11 10:59:40 +08:00
hnd4r7
6ad7a72b6c Fix: don't return err if subresource type is not found when listing application resources (#5295)
Signed-off-by: hnd4r7 <307365651@qq.com>

Signed-off-by: hnd4r7 <307365651@qq.com>
2023-01-10 22:10:00 +08:00
Tianxin Dong
432a5f37b7 Fix: fix backport command action caused by upgrades (#5300)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-10 19:02:21 +08:00
Tianxin Dong
b71a8a353a Fix: fix vela debug cli to find id for step (#5294)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-10 16:46:21 +08:00
old prince
46b31b2569 Fix: Delete appplication fails if status.workflow.endTime not specified. (#5287)
Error Details:
E0106 08:12:02.807341       1 controller.go:317] controller/application "msg"="Reconciler error" "error"="Application.core.oam.dev \"test\" is invalid: status.workflow.endTime: Invalid value: \"null\": status.workflow.endTime in body must be of type string: \"null\"" "name"="test" "namespace"="test" "reconciler group"="core.oam.dev" "reconciler kind"="Application"

If the workflow is not completed, the endtime should be null, and the deletion of the application will fail

Signed-off-by: old.prince <di7zhang@gmail.com>

Signed-off-by: old.prince <di7zhang@gmail.com>
2023-01-10 15:14:10 +08:00
Charlie Chiang
3f5d558f22 Test: let addon helper tests use local helm server (#5286)
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2023-01-09 12:09:27 +08:00
Jianbo Sun
5d6848b1c6 Chore: update makefile with velaql in make def-install (#5285)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-01-06 17:45:50 +08:00
689 changed files with 19308 additions and 49201 deletions

8
.github/CODEOWNERS vendored
View File

@@ -26,12 +26,14 @@ vela-templates/ @Somefive @barnettZQG @wonderflow @FogDong
# Owner of vela CLI
references/cli/ @Somefive @zzxwill @StevenLeiZhang @charlie0129 @chivalryq
# Owner of vela APIServer
pkg/apiserver/ @barnettZQG @yangsoon @FogDong
# Owner of vela addon framework
pkg/addon/ @wangyikewxgm @wonderflow @charlie0129
# Owner of resource keeper and tracker
pkg/resourcekeeper @Somefive @FogDong
pkg/resourcetracker @Somefive @FogDong
.github/ @chivalryq @wonderflow
makefiles @chivalryq @wonderflow
go.* @chivalryq @wonderflow

21
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
commit-message:
prefix: "Chore: "
include: "scope"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "Chore: "
include: "scope"

View File

@@ -1,196 +0,0 @@
name: VelaUX APIServer Test
on:
push:
branches:
- master
- release-*
- apiserver
tags:
- v*
workflow_dispatch: { }
pull_request:
branches:
- master
- release-*
- apiserver
env:
# Common versions
GO_VERSION: '1.19'
permissions:
contents: read
jobs:
detect-noop:
runs-on: ubuntu-20.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@12aca0a884f6137d619d6a8a09fcc3406ced5281
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
continue-on-error: true
apiserver-unit-tests:
runs-on: ubuntu-20.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
with:
submodules: true
- name: Cache Go Dependencies
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7
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@538a4d2a1041920c47630172445cb688592d6e51 # 1.8.0
with:
mongodb-version: '5.0'
# TODO need update action version to resolve node 12 deprecated.
- name: install Kubebuilder
uses: RyanSiu1995/kubebuilder-action@ff52bff1bae252239223476e5ab0d71d6ba02343
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@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
flags: apiserver-unittests
name: codecov-umbrella
apiserver-e2e-tests:
runs-on: aliyun
needs: [ detect-noop ]
if: needs.detect-noop.outputs.noop != 'true'
strategy:
matrix:
k8s-version: ["v1.20","v1.24"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true
steps:
- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
with:
submodules: true
- name: Get dependencies
run: |
go get -v -t -d ./...
- 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@293b8e5822a20bc0d5bcdd4826f1a665e72aba96
with:
version: ${{ matrix.k8s-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
k3d-args: ${{ env.EGRESS_ARG }}
- name: Setup K3d (Worker)
uses: nolar/setup-k3d-k3s@293b8e5822a20bc0d5bcdd4826f1a665e72aba96
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: |
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: Load image to k3d cluster
run: make image-load
- name: Cleanup for e2e tests
run: |
make vela-cli
make e2e-cleanup
make e2e-setup-core
bin/vela addon enable fluxcd
bin/vela addon enable vela-workflow --override-definitions
timeout 600s bash -c -- 'while true; do kubectl get ns flux-system; if [ $? -eq 0 ] ; then break; else sleep 5; fi;done'
kubectl wait --for=condition=Ready pod -l app.kubernetes.io/name=vela-core,app.kubernetes.io/instance=kubevela -n vela-system --timeout=600s
kubectl wait --for=condition=Ready pod -l app=source-controller -n flux-system --timeout=600s
kubectl wait --for=condition=Ready pod -l app=helm-controller -n flux-system --timeout=600s
kubectl wait --for=condition=Ready pod -l app.kubernetes.io/name=vela-workflow -n vela-system --timeout=600s
- name: Run api server e2e test
run: |
export ALIYUN_ACCESS_KEY_ID=${{ secrets.ALIYUN_ACCESS_KEY_ID }}
export ALIYUN_ACCESS_KEY_SECRET=${{ secrets.ALIYUN_ACCESS_KEY_SECRET }}
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
make e2e-apiserver-test
- name: Stop kubevela, get profile
run: make end-e2e-core
- name: Upload coverage report
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: /tmp/e2e_apiserver_test.out
flags: apiserver-e2etests
name: codecov-umbrella
- name: Clean e2e profile
run: rm /tmp/e2e-profile.out
- name: Cleanup image
if: ${{ always() }}
run: make image-cleanup

View File

@@ -17,12 +17,12 @@ jobs:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
fetch-depth: 0
- name: Open Backport PR
uses: zeebe-io/backport-action@2ee900dc92632adf994f8e437b6d16840fd61f58
uses: zeebe-io/backport-action@a759fd2d7d3314c9bb57d97a0350a12e878d3c7a
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_workspace: ${{ github.workspace }}

View File

@@ -31,7 +31,7 @@ jobs:
VELA_ROLLOUT_HELM_CHART_NAME: vela-rollout
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Get git revision
id: vars
shell: bash
@@ -42,7 +42,7 @@ jobs:
with:
version: v3.4.0
- name: Setup node
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version: '14'
- name: Generate helm doc

View File

@@ -23,7 +23,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Initialize CodeQL
uses: github/codeql-action/init@959cbb7472c4d4ad70cdfe6f4976053fe48ab394 # v2.1.37

View File

@@ -15,7 +15,7 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: thehanimo/pr-title-checker@v1.3.5
- uses: thehanimo/pr-title-checker@v1.3.7
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: true

View File

@@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Set up Go 1.19
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
env:
GO_VERSION: '1.19'
with:
@@ -25,7 +25,7 @@ jobs:
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Get the version
id: get_version

View File

@@ -23,12 +23,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
submodules: true
@@ -43,5 +43,5 @@ jobs:
go build -o docgen hack/docgen/def/gen.go
./docgen --type=comp --force-example-doc --path=./comp-def-check.md
./docgen --type=trait --force-example-doc --path=./trait-def-check.md
./docgen --type=wf --force-example-doc --path=./wf-def-check.md
./docgen --type=wf --force-example-doc --path=./wf-def-check.md --def-dir=./vela-templates/definitions/internal/workflowstep/
./docgen --type=policy --force-example-doc --path=./policy-def-check.md

View File

@@ -39,7 +39,7 @@ 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:
@@ -49,13 +49,20 @@ jobs:
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@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Install tools
run: |
sudo apt-get update
sudo apt-get install make gcc jq ca-certificates curl gnupg -y
snap install docker
snap install kubectl --classic
snap install helm --classic
- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
with:
go-version: ${{ env.GO_VERSION }}
@@ -114,7 +121,8 @@ jobs:
make e2e-multicluster-test
- name: Stop kubevela, get profile
run: make end-e2e-core
run: |
make end-e2e-core-shards
- name: Upload coverage report
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70

View File

@@ -39,7 +39,7 @@ 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:
@@ -52,16 +52,18 @@ jobs:
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
with:
go-version: ${{ env.GO_VERSION }}
- name: Get dependencies
run: |
go get -v -t -d ./...
go install github.com/onsi/ginkgo/ginkgo
go get github.com/onsi/gomega/...
- name: Tear down K3d if exist
run: |

View File

@@ -39,7 +39,7 @@ 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:
@@ -52,16 +52,26 @@ jobs:
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Install tools
run: |
sudo apt-get update
sudo apt-get install make gcc jq ca-certificates curl gnupg -y
snap install docker
snap install kubectl --classic
snap install helm --classic
- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
with:
go-version: ${{ env.GO_VERSION }}
- name: Get dependencies
run: |
go get -v -t -d ./...
go install github.com/onsi/ginkgo/ginkgo
go get github.com/onsi/gomega/...
- name: Tear down K3d if exist
run: |

View File

@@ -44,12 +44,12 @@ jobs:
steps:
- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
submodules: true
@@ -69,12 +69,12 @@ jobs:
steps:
- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
submodules: true
@@ -83,33 +83,33 @@ jobs:
# version, but we prefer this action because it leaves 'annotations' (i.e.
# it comments on PRs to point out linter violations).
- name: Lint
uses: golangci/golangci-lint-action@07db5389c99593f11ad7b44463c2d4233066a9b1 # v3.3.0
uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5 # v3.4.0
with:
version: ${{ env.GOLANGCI_VERSION }}
check-diff:
runs-on: aliyun
runs-on: self-hosted
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup node
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version: '14'
- name: Cache Go Dependencies
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
@@ -133,17 +133,17 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
with:
go-version: ${{ env.GO_VERSION }}
- name: Cache Go Dependencies
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
@@ -164,55 +164,35 @@ jobs:
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
submodules: true
- name: Set up QEMU
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v2.2.1
uses: docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7 # v2.4.1
- name: Build Test for vela core
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v3.2.0
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4.0.0
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
check-apiserver-image-build:
runs-on: ubuntu-latest
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
with:
submodules: true
- name: Set up QEMU
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v2.2.1
- name: Build Test for apiserver
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v3.2.0
with:
context: .
file: Dockerfile.apiserver
platforms: linux/amd64,linux/arm64
check-cli-image-build:
runs-on: ubuntu-latest
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
submodules: true
- name: Set up QEMU
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v2.2.1
uses: docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7 # v2.4.1
- name: Build Test for CLI
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v3.2.0
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4.0.0
with:
context: .
file: Dockerfile.cli

View File

@@ -13,13 +13,13 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout Actions
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
repository: "oam-dev/kubevela-github-actions"
path: ./actions
ref: v0.4.2
- name: Setup Node.js
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version: '14'
cache: 'npm'
@@ -36,8 +36,9 @@ jobs:
runs-on: ubuntu-22.04
if: github.event.issue.pull_request && contains(github.event.comment.body, '/backport')
permissions:
issues: write
contents: write
pull-requests: write
issues: write
steps:
- name: Extract Command
id: command
@@ -50,7 +51,7 @@ jobs:
allow-edits: "false"
permission-level: read
- name: Handle Command
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975
env:
VERSION: ${{ steps.command.outputs.command-arguments }}
with:
@@ -62,7 +63,7 @@ jobs:
label = "backport " + version
}
// Add our backport label.
github.issues.addLabels({
github.rest.issues.addLabels({
// Every pull request is an issue, but not every issue is a pull request.
issue_number: context.issue.number,
owner: context.repo.owner,
@@ -71,11 +72,11 @@ jobs:
})
console.log("Added '" + label + "' label.")
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
fetch-depth: 0
- name: Open Backport PR
uses: zeebe-io/backport-action@2ee900dc92632adf994f8e437b6d16840fd61f58
uses: zeebe-io/backport-action@a759fd2d7d3314c9bb57d97a0350a12e878d3c7a
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_workspace: ${{ github.workspace }}

View File

@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
name: Check for unapproved licenses
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:

View File

@@ -20,7 +20,7 @@ jobs:
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Get the version
id: get_version
run: |
@@ -53,11 +53,11 @@ jobs:
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
- uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v2.2.1
- uses: docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7 # v2.4.1
with:
driver-opts: image=moby/buildkit:master
- uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v3.2.0
- uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4.0.0
name: Build & Pushing vela-core for Dockerhub, GHCR and ACR
with:
context: .
@@ -76,7 +76,7 @@ jobs:
ghcr.io/${{ github.repository_owner }}/oamdev/vela-core:${{ steps.get_version.outputs.VERSION }}
${{ secrets.ACR_DOMAIN }}/oamdev/vela-core:${{ steps.get_version.outputs.VERSION }}
- uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v3.2.0
- uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4.0.0
name: Build & Pushing CLI for Dockerhub, GHCR and ACR
with:
context: .
@@ -100,7 +100,7 @@ jobs:
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Get the version
id: get_version
run: |
@@ -133,30 +133,11 @@ jobs:
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
- uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v2.2.1
- uses: docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7 # v2.4.1
with:
driver-opts: image=moby/buildkit:master
- uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v3.2.0
name: Build & Pushing vela-apiserver for Dockerhub, GHCR and ACR
with:
context: .
file: Dockerfile.apiserver
labels: |-
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.revision=${{ github.sha }}
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
build-args: |
GITVERSION=git-${{ steps.vars.outputs.git_revision }}
VERSION=${{ steps.get_version.outputs.VERSION }}
GOPROXY=https://proxy.golang.org
tags: |-
docker.io/oamdev/vela-apiserver:${{ steps.get_version.outputs.VERSION }}
ghcr.io/${{ github.repository_owner }}/oamdev/vela-apiserver:${{ steps.get_version.outputs.VERSION }}
${{ secrets.ACR_DOMAIN }}/oamdev/vela-apiserver:${{ steps.get_version.outputs.VERSION }}
- uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v3.2.0
- uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4.0.0
name: Build & Pushing runtime rollout Dockerhub, GHCR and ACR
with:
context: .
@@ -182,7 +163,7 @@ jobs:
CAPABILITY_ENDPOINT: oss-cn-beijing.aliyuncs.com
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- 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

@@ -7,7 +7,6 @@ on:
workflow_dispatch: { }
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUCKET: ${{ secrets.CLI_OSS_BUCKET }}
ENDPOINT: ${{ secrets.CLI_OSS_ENDPOINT }}
ACCESS_KEY: ${{ secrets.CLI_OSS_ACCESS_KEY }}
@@ -28,107 +27,38 @@ jobs:
repository-projects: read
statuses: read
runs-on: ubuntu-latest
name: build
strategy:
matrix:
TARGETS: [ linux/amd64, darwin/amd64, windows/amd64, linux/arm64, darwin/arm64 ]
env:
VELA_VERSION_KEY: github.com/oam-dev/kubevela/version.VelaVersion
VELA_GITVERSION_KEY: github.com/oam-dev/kubevela/version.GitRevision
GO_BUILD_ENV: GO111MODULE=on CGO_ENABLED=0
DIST_DIRS: find * -type d -exec
name: goreleaser
steps:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
fetch-depth: 0
- run: git fetch --force --tags
- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
with:
go-version: 1.19
- name: Get release
id: get_release
uses: bruceadams/get-release@74c3d60f5a28f358ccf241a00c9021ea16f0569f # v1.3.2
cache: true
- uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0
with:
distribution: goreleaser
version: 1.14.1
args: release --rm-dist --timeout 60m
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Since goreleaser haven't supported aliyun OSS, we need to upload the release manually
- name: Get version
run: echo "VELA_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Get matrix
id: get_matrix
run: |
TARGETS=${{matrix.TARGETS}}
echo "OS=${TARGETS%/*}" >> $GITHUB_OUTPUT
echo "ARCH=${TARGETS#*/}" >> $GITHUB_OUTPUT
- name: Get ldflags
id: get_ldflags
run: |
LDFLAGS="-s -w -X ${{ env.VELA_VERSION_KEY }}=${{ env.VELA_VERSION }} -X ${{ env.VELA_GITVERSION_KEY }}=git-$(git rev-parse --short HEAD)"
echo "LDFLAGS=${LDFLAGS}" >> $GITHUB_ENV
- name: Build
run: |
${{ env.GO_BUILD_ENV }} GOOS=${{ steps.get_matrix.outputs.OS }} GOARCH=${{ steps.get_matrix.outputs.ARCH }} \
go build -ldflags "${{ env.LDFLAGS }}" \
-o _bin/vela/${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}/vela -v \
./references/cmd/cli/main.go
${{ env.GO_BUILD_ENV }} GOOS=${{ steps.get_matrix.outputs.OS }} GOARCH=${{ steps.get_matrix.outputs.ARCH }} \
go build -ldflags "${{ env.LDFLAGS }}" \
-o _bin/kubectl-vela/${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}/kubectl-vela -v \
./cmd/plugin/main.go
- name: Compress
run: |
echo "\n## Release Info\nVERSION: ${{ env.VELA_VERSION }}" >> README.md && \
echo "GIT_COMMIT: ${GITHUB_SHA}\n" >> README.md && \
cd _bin/vela && \
${{ env.DIST_DIRS }} cp ../../LICENSE {} \; && \
${{ env.DIST_DIRS }} cp ../../README.md {} \; && \
${{ env.DIST_DIRS }} tar -zcf vela-{}.tar.gz {} \; && \
${{ env.DIST_DIRS }} zip -r vela-{}.zip {} \; && \
cd ../kubectl-vela && \
${{ env.DIST_DIRS }} cp ../../LICENSE {} \; && \
${{ env.DIST_DIRS }} cp ../../README.md {} \; && \
${{ env.DIST_DIRS }} tar -zcf kubectl-vela-{}.tar.gz {} \; && \
${{ env.DIST_DIRS }} zip -r kubectl-vela-{}.zip {} \; && \
cd .. && \
sha256sum vela/vela-* kubectl-vela/kubectl-vela-* >> sha256-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.txt \
- name: Upload Vela tar.gz
uses: kubevela/vela-upload-release-asset@9b3858e67d3205e056d6220e5972abb32fc47289 # v1.0.0
with:
release_id: ${{ steps.get_release.outputs.id }}
asset_path: ./_bin/vela/vela-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.tar.gz
asset_name: vela-${{ env.VELA_VERSION }}-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.tar.gz
- name: Upload Vela zip
uses: kubevela/vela-upload-release-asset@9b3858e67d3205e056d6220e5972abb32fc47289 # v1.0.0
with:
release_id: ${{ steps.get_release.outputs.id }}
asset_path: ./_bin/vela/vela-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.zip
asset_name: vela-${{ env.VELA_VERSION }}-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.zip
- name: Upload Kubectl-Vela tar.gz
uses: kubevela/vela-upload-release-asset@9b3858e67d3205e056d6220e5972abb32fc47289 # v1.0.0
with:
release_id: ${{ steps.get_release.outputs.id }}
asset_path: ./_bin/kubectl-vela/kubectl-vela-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.tar.gz
asset_name: kubectl-vela-${{ env.VELA_VERSION }}-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.tar.gz
- name: Upload Kubectl-Vela zip
uses: kubevela/vela-upload-release-asset@9b3858e67d3205e056d6220e5972abb32fc47289 # v1.0.0
with:
release_id: ${{ steps.get_release.outputs.id }}
asset_path: ./_bin/kubectl-vela/kubectl-vela-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.zip
asset_name: kubectl-vela-${{ env.VELA_VERSION }}-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.zip
- name: Post sha256
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
with:
name: sha256sums
path: ./_bin/sha256-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.txt
retention-days: 1
- name: clear the asset
run: |
rm -rf ./_bin/vela/${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}
mv ./_bin/vela/vela-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.tar.gz ./_bin/vela/vela-${{ env.VELA_VERSION }}-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.tar.gz
mv ./_bin/vela/vela-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.zip ./_bin/vela/vela-${{ env.VELA_VERSION }}-${{ steps.get_matrix.outputs.OS }}-${{ steps.get_matrix.outputs.ARCH }}.zip
- 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
run: ./ossutil --config-file .ossutilconfig config -i ${ACCESS_KEY} -k ${ACCESS_KEY_SECRET} -e ${ENDPOINT} -c .ossutilconfig
run: ./ossutil --config-file .ossutilconfig config -i ${ACCESS_KEY} -k ${ACCESS_KEY_SECRET} -e ${ENDPOINT}
- name: split files to be upload
run: mkdir -p ./dist/files_upload && mv ./dist/*.tar.gz ./dist/files_upload && mv ./dist/*.zip ./dist/files_upload
- name: sync local to cloud
run: ./ossutil --config-file .ossutilconfig sync ./_bin/vela oss://$BUCKET/binary/vela/${{ env.VELA_VERSION }}
run: ./ossutil --config-file .ossutilconfig sync ./dist/files_upload oss://$BUCKET/binary/vela/${{ env.VELA_VERSION }}
- name: sync the latest version file
if: ${{ !contains(env.VELA_VERSION,'alpha') && !contains(env.VELA_VERSION,'beta') }}
if: ${{ !contains(env.VELA_VERSION,'alpha') && !contains(env.VELA_VERSION,'beta') && !contains(env.VELA_VERSION,'rc') }}
run: |
LATEST_VERSION=$(curl -fsSl https://static.kubevela.net/binary/vela/latest_version)
verlte() {
@@ -137,7 +67,6 @@ jobs:
verlte ${{ env.VELA_VERSION }} $LATEST_VERSION && echo "${{ env.VELA_VERSION }} <= $LATEST_VERSION, skip update" && exit 0
echo ${{ env.VELA_VERSION }} > ./latest_version
./ossutil --config-file .ossutilconfig cp -u ./latest_version oss://$BUCKET/binary/vela/latest_version
upload-plugin-homebrew:
permissions:
contents: write
@@ -150,42 +79,15 @@ jobs:
statuses: read
needs: build
runs-on: ubuntu-latest
if: ${{ !contains(github.ref, 'alpha') && !contains(github.ref, 'beta') && !contains(github.ref, 'rc') }}
name: upload-sha256sums
steps:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- name: Get release
id: get_release
uses: bruceadams/get-release@74c3d60f5a28f358ccf241a00c9021ea16f0569f # v1.3.2
- name: Download sha256sums
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # v3.0.1
with:
name: sha256sums
path: cli-artifacts
- 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
uses: kubevela/vela-upload-release-asset@9b3858e67d3205e056d6220e5972abb32fc47289 # v1.0.0
with:
release_id: ${{ steps.get_release.outputs.id }}
asset_path: cli-artifacts/sha256sums.txt
asset_name: sha256sums.txt
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Update kubectl plugin version in krew-index
uses: rajatjindal/krew-release-bot@3320c0b546b5d2320613c46762bd3f73e2801bdc # v0.0.38
uses: rajatjindal/krew-release-bot@92da038bbf995803124a8e50ebd438b2f37bbbb0 # v0.0.43
- name: Update Homebrew formula
uses: dawidd6/action-homebrew-bump-formula@02e79d9da43d79efa846d73695b6052cbbdbf48a # v3.8.3
uses: dawidd6/action-homebrew-bump-formula@e9b43cd30eec6ea80777e7e22e1526beb1675c18 # v3.9.0
with:
token: ${{ secrets.HOMEBREW_TOKEN }}
formula: kubevela

View File

@@ -23,12 +23,12 @@ jobs:
steps:
- name: "Checkout code"
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@937ffa90d79c7d720498178154ad4c7ba1e4ad8c # tag=v2.1.0
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # tag=v2.1.2
with:
results_file: results.sarif
results_format: sarif
@@ -47,7 +47,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: SARIF file
path: results.sarif

51
.github/workflows/sdk-test.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
name: SDK Test
on:
push:
tags:
- v*
workflow_dispatch: {}
pull_request:
paths:
- "vela-templates/definitions/**"
- "pkg/definition/gen_sdk/**"
branches:
- master
- release-*
permissions:
contents: read
env:
# Common versions
GO_VERSION: '1.19'
GOLANGCI_VERSION: 'v1.49'
jobs:
sdk-tests:
runs-on: ubuntu-20.04
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Setup Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
with:
go-version: ${{ env.GO_VERSION }}
- name: Install Go tools
run: |
make goimports
make golangci
- name: Build CLI
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 --init
- name: Validate SDK
run: |
cd kubevela-go-sdk
go mod tidy
golangci-lint run --timeout 5m -e "exported:" -e "dot-imports" ./...

View File

@@ -18,12 +18,12 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
with:
go-version: ${{ env.GO_VERSION }}
- name: Check out code into the Go module directory
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Get the version
id: get_version

52
.github/workflows/sync-sdk.yaml vendored Normal file
View File

@@ -0,0 +1,52 @@
name: Sync SDK
on:
push:
paths:
- vela-templates/definitions/internal/**
- pkg/definition/gen_sdk/**
- .github/workflows/sync-sdk.yaml
tags:
- "v*"
branches:
- master
- release-*
permissions:
contents: read
env:
GO_VERSION: '1.19'
jobs:
sync_sdk:
runs-on: ubuntu-20.04
steps:
- name: Set up Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
with:
go-version: ${{ env.GO_VERSION }}
- name: Check out code into the Go module directory
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Install Go tools
run: |
make goimports
- name: Build CLI
run: make vela-cli
- name: Sync SDK to kubevela/kubevela-go-sdk
run: bash ./hack/sdk/sync.sh
env:
SSH_DEPLOY_KEY: ${{ secrets.GO_SDK_DEPLOY_KEY }}
VERSION: ${{ steps.get_version.outputs.VERSION }}
COMMIT_ID: ${{ github.sha }}

View File

@@ -8,7 +8,7 @@ permissions:
jobs:
clean-image:
runs-on: aliyun
runs-on: self-hosted
steps:
- name: Cleanup image
run: docker image prune -f

View File

@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Build Vela Core image from Dockerfile
run: |

View File

@@ -43,17 +43,17 @@ jobs:
steps:
- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
with:
go-version: ${{ env.GO_VERSION }}
- name: Check out code into the Go module directory
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
submodules: true
- name: Cache Go Dependencies
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
@@ -61,6 +61,8 @@ jobs:
- name: Install ginkgo
run: |
sudo sed -i 's/azure\.//' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y golang-ginkgo-dev
- name: Setup K3d

2
.gitignore vendored
View File

@@ -53,3 +53,5 @@ git-page/
# e2e rollout runtime image build
runtime/rollout/e2e/tmp
vela.json
dist/

76
.goreleaser.yaml Normal file
View File

@@ -0,0 +1,76 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
builds:
- id: vela-cli
binary: vela
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
main: ./references/cmd/cli/main.go
ldflags:
- -s -w -X github.com/oam-dev/kubevela/version.VelaVersion={{ .Version }} -X github.com/oam-dev/kubevela/version.GitRevision=git-{{.ShortCommit}}
env:
- CGO_ENABLED=0
- id: kubectl-vela
binary: kubectl-vela
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
main: ./cmd/plugin/main.go
ldflags:
- -s -w -X github.com/oam-dev/kubevela/version.VelaVersion={{ .Version }} -X github.com/oam-dev/kubevela/version.GitRevision=git-{{.ShortCommit}}
archives:
- format: tar.gz
id: vela-cli-tgz
wrap_in_directory: '{{ .Os }}-{{ .Arch }}'
builds:
- vela-cli
name_template: '{{ trimsuffix .ArtifactName ".exe" }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}'
files: [ LICENSE, README.md ]
- format: zip
id: vela-cli-zip
builds:
- vela-cli
wrap_in_directory: '{{ .Os }}-{{ .Arch }}'
name_template: '{{ trimsuffix .ArtifactName ".exe" }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}'
files: [ LICENSE, README.md ]
- format: tar.gz
id: plugin-tgz
builds:
- kubectl-vela
wrap_in_directory: '{{ .Os }}-{{ .Arch }}'
name_template: '{{ trimsuffix .ArtifactName ".exe" }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}'
files: [ LICENSE, README.md ]
- format: zip
id: plugin-zip
builds:
- kubectl-vela
wrap_in_directory: '{{ .Os }}-{{ .Arch }}'
name_template: '{{ trimsuffix .ArtifactName ".exe" }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}'
files: [ LICENSE, README.md ]
checksum:
name_template: 'sha256sums.txt'
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
# The lines beneath this are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

View File

@@ -33,8 +33,8 @@ spec:
arch: amd64
{{addURIAndSha "https://github.com/oam-dev/kubevela/releases/download/{{ .TagName }}/kubectl-vela-{{ .TagName }}-windows-amd64.zip" .TagName }}
files:
- from: "*/kubectl-vela"
to: "kubectl-vela.exe"
- from: "*/kubectl-vela.exe"
to: "."
- from: "*/LICENSE"
to: "."
bin: "kubectl-vela.exe"

View File

@@ -1,6 +1,6 @@
ARG BASE_IMAGE
# Build the manager binary
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine@sha256:a9b24b67dc83b3383d22a14941c2b2b2ca6a103d805cac6820fd1355943beaf1 as builder
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine@sha256:2381c1e5f8350a901597d633b2e517775eeac7a6682be39225a93b22cfd0f8bb as builder
WORKDIR /workspace
# Copy the Go Modules manifests
@@ -34,7 +34,7 @@ RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
# You can replace distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
# Overwrite `BASE_IMAGE` by passing `--build-arg=BASE_IMAGE=gcr.io/distroless/static:nonroot`
FROM ${BASE_IMAGE:-alpine:3.15@sha256:cf34c62ee8eb3fe8aa24c1fab45d7e9d12768d945c3f5a6fd6a63d901e898479}
FROM ${BASE_IMAGE:-alpine@sha256:e2e16842c9b54d985bf1ef9242a313f36b856181f188de21313820e177002501}
# This is required by daemon connecting with cri
RUN apk add --no-cache ca-certificates bash expat

View File

@@ -1,48 +0,0 @@
ARG BASE_IMAGE
# Build the manager binary
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine@sha256:a9b24b67dc83b3383d22a14941c2b2b2ca6a103d805cac6820fd1355943beaf1 as builder
ARG GOPROXY
ENV GOPROXY=${GOPROXY:-https://goproxy.cn}
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download
# Copy the go source for building apiserver
COPY cmd/apiserver/ cmd/apiserver/
COPY apis/ apis/
COPY pkg/ pkg/
COPY version/ version/
COPY references/ references/
# Build
ARG TARGETARCH
ARG VERSION
ARG GITVERSION
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}" \
-o apiserver-${TARGETARCH} cmd/apiserver/main.go
# Use alpine as base image due to the discussion in issue #1448
# You can replace distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
# Overwrite `BASE_IMAGE` by passing `--build-arg=BASE_IMAGE=gcr.io/distroless/static:nonroot`
FROM ${BASE_IMAGE:-alpine:3.15@sha256:cf34c62ee8eb3fe8aa24c1fab45d7e9d12768d945c3f5a6fd6a63d901e898479}
# This is required by daemon connecting with cri
RUN apk add --no-cache ca-certificates bash expat
WORKDIR /
ARG TARGETARCH
COPY --from=builder /workspace/apiserver-${TARGETARCH} /usr/local/bin/apiserver
COPY entrypoint.sh /usr/local/bin/
ENTRYPOINT ["entrypoint.sh"]
CMD ["apiserver"]

View File

@@ -1,6 +1,6 @@
ARG BASE_IMAGE
# Build the cli binary
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine@sha256:a9b24b67dc83b3383d22a14941c2b2b2ca6a103d805cac6820fd1355943beaf1 as builder
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine@sha256:2381c1e5f8350a901597d633b2e517775eeac7a6682be39225a93b22cfd0f8bb as builder
ARG GOPROXY
ENV GOPROXY=${GOPROXY:-https://goproxy.cn}
WORKDIR /workspace

View File

@@ -1,6 +1,6 @@
ARG BASE_IMAGE
# Build the manager binary
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine@sha256:a9b24b67dc83b3383d22a14941c2b2b2ca6a103d805cac6820fd1355943beaf1 as builder
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine@sha256:2381c1e5f8350a901597d633b2e517775eeac7a6682be39225a93b22cfd0f8bb as builder
WORKDIR /workspace
# Copy the Go Modules manifests
@@ -13,7 +13,6 @@ RUN go mod download
# Copy the go source
COPY cmd/core/main.go main.go
COPY cmd/core/main_e2e_test.go main_e2e_test.go
COPY cmd/apiserver/main.go cmd/apiserver/main.go
COPY cmd/ cmd/
COPY apis/ apis/
COPY pkg/ pkg/
@@ -29,10 +28,6 @@ RUN apk add gcc musl-dev libc-dev ;\
GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
go test -c -o manager-${TARGETARCH} -cover -covermode=atomic -coverpkg ./... .
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}" \
-o apiserver-${TARGETARCH} cmd/apiserver/main.go
# Use alpine as base image due to the discussion in issue #1448
# You can replace distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
@@ -46,7 +41,6 @@ WORKDIR /
ARG TARGETARCH
COPY --from=builder /workspace/manager-${TARGETARCH} /usr/local/bin/manager
COPY --from=builder /workspace/apiserver-${TARGETARCH} /usr/local/bin/apiserver
COPY entrypoint.sh /usr/local/bin/

View File

@@ -18,8 +18,6 @@ test-cli-gen:
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)
unit-test-apiserver:
go test -gcflags=all=-l -coverprofile=coverage.txt $(shell go list ./pkg/... ./cmd/... | grep -E 'apiserver|velaql')
# Build vela cli binary
build: vela-cli kubectl-vela
@@ -39,16 +37,23 @@ fmt: goimports installcue
$(CUE) fmt ./pkg/stdlib/op.cue
$(CUE) fmt ./pkg/workflow/tasks/template/static/*
# Run go vet against code
sdk_fmt:
./hack/sdk/reviewable.sh
vet:
go vet ./...
@$(INFO) go vet
@go vet $(shell go list ./...|grep -v scaffold)
staticcheck: staticchecktool
$(STATICCHECK) ./...
@$(INFO) staticcheck
@$(STATICCHECK) $(shell go list ./...|grep -v scaffold)
lint: golangci
$(GOLANGCILINT) run ./...
@$(INFO) lint
@$(GOLANGCILINT) run --skip-dirs 'scaffold'
reviewable: manifests fmt vet lint staticcheck helm-doc-gen
reviewable: manifests fmt vet lint staticcheck helm-doc-gen sdk_fmt
go mod tidy
# Execute auto-gen code commands and ensure branch is clean.
@@ -61,9 +66,6 @@ check-diff: reviewable
docker-push:
docker push $(VELA_CORE_IMAGE)
build-swagger:
go run ./cmd/apiserver/main.go build-swagger ./docs/apidoc/swagger.json
image-cleanup:
@@ -98,10 +100,9 @@ image-load-runtime-cluster:
core-test:
go test ./pkg/... -coverprofile cover.out
# Build vela core manager and apiserver binary
# Build vela core manager binary
manager:
$(GOBUILD_ENV) go build -o bin/manager -a -ldflags $(LDFLAGS) ./cmd/core/main.go
$(GOBUILD_ENV) go build -o bin/apiserver -a -ldflags $(LDFLAGS) ./cmd/apiserver/main.go
vela-runtime-rollout-manager:
$(GOBUILD_ENV) go build -o ./runtime/rollout/bin/manager -a -ldflags $(LDFLAGS) ./runtime/rollout/cmd/main.go

View File

@@ -18,6 +18,7 @@
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4602/badge)](https://bestpractices.coreinfrastructure.org/projects/4602)
![E2E status](https://github.com/kubevela/kubevela/workflows/E2E%20Test/badge.svg)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/kubevela/kubevela/badge)](https://api.securityscorecards.dev/projects/github.com/kubevela/kubevela)
[![](https://img.shields.io/badge/KubeVela-Check%20Your%20Contribution-orange)](https://opensource.alibaba.com/contribution_leaderboard/details?projectValue=kubevela)
## Introduction
@@ -29,17 +30,28 @@ KubeVela is a modern application delivery platform that makes deploying and oper
KubeVela practices the "render, orchestrate, deploy" workflow with below highlighted values added to existing ecosystem:
* Deployment as Code
#### **Deployment as Code**
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/).
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](https://cuelang.org/).
No ad-hoc scripts, no dirty glue code, just deploy. The deployment workflow in KubeVela is powered by [Open Application Model](https://oam.dev/).
* Built-in security and compliance building blocks
#### **Built-in observability, multi-tenancy and security support**
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.
Choose from the wide range of LDAP integrations we provided out-of-box, enjoy enhanced [multi-tenancy and multi-cluster authorization and authentication](https://kubevela.net/docs/platform-engineers/auth/advance),
pick and apply fine-grained RBAC modules and customize them per your own supply chain requirements.
All delivery process has fully [automated observability dashboards](https://kubevela.net/docs/platform-engineers/operations/observability).
* Multi-cloud/hybrid-environments app delivery as first-class citizen
#### **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.
Natively supports multi-cluster/hybrid-cloud scenarios such as progressive rollout across test/staging/production environments,
automatic canary, blue-green and continuous verification, rich placement strategy across clusters and clouds,
along with automated cloud environments provision.
#### **Lightweight but highly extensible architecture**
Minimize your control plane deployment with only one pod and 0.5c1g resources to handle thousands of application delivery.
Glue and orchestrate all your infrastructure capabilities as reusable modules with a highly extensible architecture
and share the large growing community [addons](https://kubevela.net/docs/reference/addons/overview).
## Getting Started

View File

@@ -336,7 +336,8 @@ type WorkflowStatus struct {
Steps []workflowv1alpha1.WorkflowStepStatus `json:"steps,omitempty"`
StartTime metav1.Time `json:"startTime,omitempty"`
EndTime metav1.Time `json:"endTime,omitempty"`
// +nullable
EndTime metav1.Time `json:"endTime,omitempty"`
}
// DefinitionType describes the type of DefinitionRevision.

View File

@@ -45,13 +45,13 @@ type ApplicationRevisionCompressibleFields struct {
Application Application `json:"application"`
// ComponentDefinitions records the snapshot of the componentDefinitions related with the created/modified Application
ComponentDefinitions map[string]ComponentDefinition `json:"componentDefinitions,omitempty"`
ComponentDefinitions map[string]*ComponentDefinition `json:"componentDefinitions,omitempty"`
// WorkloadDefinitions records the snapshot of the workloadDefinitions related with the created/modified Application
WorkloadDefinitions map[string]WorkloadDefinition `json:"workloadDefinitions,omitempty"`
// TraitDefinitions records the snapshot of the traitDefinitions related with the created/modified Application
TraitDefinitions map[string]TraitDefinition `json:"traitDefinitions,omitempty"`
TraitDefinitions map[string]*TraitDefinition `json:"traitDefinitions,omitempty"`
// ScopeDefinitions records the snapshot of the scopeDefinitions related with the created/modified Application
ScopeDefinitions map[string]ScopeDefinition `json:"scopeDefinitions,omitempty"`
@@ -60,7 +60,7 @@ type ApplicationRevisionCompressibleFields struct {
PolicyDefinitions map[string]PolicyDefinition `json:"policyDefinitions,omitempty"`
// WorkflowStepDefinitions records the snapshot of the WorkflowStepDefinitions related with the created/modified Application
WorkflowStepDefinitions map[string]WorkflowStepDefinition `json:"workflowStepDefinitions,omitempty"`
WorkflowStepDefinitions map[string]*WorkflowStepDefinition `json:"workflowStepDefinitions,omitempty"`
// ScopeGVK records the apiVersion to GVK mapping
ScopeGVK map[string]metav1.GroupVersionKind `json:"scopeGVK,omitempty"`

View File

@@ -32,18 +32,18 @@ func TestApplicationRevisionCompression(t *testing.T) {
// Fill data
spec := &ApplicationRevisionSpec{}
spec.Application = Application{Spec: ApplicationSpec{Components: []common.ApplicationComponent{{Name: "test-name"}}}}
spec.ComponentDefinitions = make(map[string]ComponentDefinition)
spec.ComponentDefinitions["def"] = ComponentDefinition{Spec: ComponentDefinitionSpec{PodSpecPath: "path"}}
spec.ComponentDefinitions = make(map[string]*ComponentDefinition)
spec.ComponentDefinitions["def"] = &ComponentDefinition{Spec: ComponentDefinitionSpec{PodSpecPath: "path"}}
spec.WorkloadDefinitions = make(map[string]WorkloadDefinition)
spec.WorkloadDefinitions["def"] = WorkloadDefinition{Spec: WorkloadDefinitionSpec{Reference: common.DefinitionReference{Name: "testdef"}}}
spec.TraitDefinitions = make(map[string]TraitDefinition)
spec.TraitDefinitions["def"] = TraitDefinition{Spec: TraitDefinitionSpec{ControlPlaneOnly: true}}
spec.TraitDefinitions = make(map[string]*TraitDefinition)
spec.TraitDefinitions["def"] = &TraitDefinition{Spec: TraitDefinitionSpec{ControlPlaneOnly: true}}
spec.ScopeDefinitions = make(map[string]ScopeDefinition)
spec.ScopeDefinitions["def"] = ScopeDefinition{Spec: ScopeDefinitionSpec{AllowComponentOverlap: true}}
spec.PolicyDefinitions = make(map[string]PolicyDefinition)
spec.PolicyDefinitions["def"] = PolicyDefinition{Spec: PolicyDefinitionSpec{ManageHealthCheck: true}}
spec.WorkflowStepDefinitions = make(map[string]WorkflowStepDefinition)
spec.WorkflowStepDefinitions["def"] = WorkflowStepDefinition{Spec: WorkflowStepDefinitionSpec{Reference: common.DefinitionReference{Name: "testname"}}}
spec.WorkflowStepDefinitions = make(map[string]*WorkflowStepDefinition)
spec.WorkflowStepDefinitions["def"] = &WorkflowStepDefinition{Spec: WorkflowStepDefinitionSpec{Reference: common.DefinitionReference{Name: "testname"}}}
spec.ReferredObjects = []common.ReferredObject{{RawExtension: runtime.RawExtension{Raw: []byte("123")}}}
testAppRev := &ApplicationRevision{Spec: *spec}

View File

@@ -142,9 +142,17 @@ func (in *ApplicationRevisionCompressibleFields) DeepCopyInto(out *ApplicationRe
in.Application.DeepCopyInto(&out.Application)
if in.ComponentDefinitions != nil {
in, out := &in.ComponentDefinitions, &out.ComponentDefinitions
*out = make(map[string]ComponentDefinition, len(*in))
*out = make(map[string]*ComponentDefinition, len(*in))
for key, val := range *in {
(*out)[key] = *val.DeepCopy()
var outVal *ComponentDefinition
if val == nil {
(*out)[key] = nil
} else {
in, out := &val, &outVal
*out = new(ComponentDefinition)
(*in).DeepCopyInto(*out)
}
(*out)[key] = outVal
}
}
if in.WorkloadDefinitions != nil {
@@ -156,9 +164,17 @@ func (in *ApplicationRevisionCompressibleFields) DeepCopyInto(out *ApplicationRe
}
if in.TraitDefinitions != nil {
in, out := &in.TraitDefinitions, &out.TraitDefinitions
*out = make(map[string]TraitDefinition, len(*in))
*out = make(map[string]*TraitDefinition, len(*in))
for key, val := range *in {
(*out)[key] = *val.DeepCopy()
var outVal *TraitDefinition
if val == nil {
(*out)[key] = nil
} else {
in, out := &val, &outVal
*out = new(TraitDefinition)
(*in).DeepCopyInto(*out)
}
(*out)[key] = outVal
}
}
if in.ScopeDefinitions != nil {
@@ -177,9 +193,17 @@ func (in *ApplicationRevisionCompressibleFields) DeepCopyInto(out *ApplicationRe
}
if in.WorkflowStepDefinitions != nil {
in, out := &in.WorkflowStepDefinitions, &out.WorkflowStepDefinitions
*out = make(map[string]WorkflowStepDefinition, len(*in))
*out = make(map[string]*WorkflowStepDefinition, len(*in))
for key, val := range *in {
(*out)[key] = *val.DeepCopy()
var outVal *WorkflowStepDefinition
if val == nil {
(*out)[key] = nil
} else {
in, out := &val, &outVal
*out = new(WorkflowStepDefinition)
(*in).DeepCopyInto(*out)
}
(*out)[key] = outVal
}
}
if in.ScopeGVK != nil {

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

@@ -186,3 +186,17 @@ const (
// VelaCoreConfig is to mark application, config and its secret or Terraform provider lelong to a KubeVela config
VelaCoreConfig = "velacore-config"
)
const (
// LabelSourceOfTruth describes the source of this app
LabelSourceOfTruth = "app.oam.dev/source-of-truth"
// FromCR means the data source of truth is from k8s CR
FromCR = "from-k8s-resource"
// FromUX means the data source of truth is from velaux data store
FromUX = "from-velaux"
// FromInner means the data source of truth is from KubeVela inner usage
// the configuration that don't want to be synced
// the addon application should be synced, but set to readonly mode
FromInner = "from-inner-system"
)

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,48 +75,51 @@ 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 |
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `optimize.cachedGvks` | Optimize types of resources to be cached. | `""` |
| `optimize.resourceTrackerListOp` | Optimize ResourceTracker List Op by adding index. | `true` |
| `optimize.controllerReconcileLoopReduction` | Optimize ApplicationController reconcile by reducing the number of loops to reconcile application. | `false` |
| `optimize.markWithProb` | Optimize ResourceTracker GC by only run mark with probability. Side effect: outdated ResourceTracker might not be able to be removed immediately. | `0.1` |
| `optimize.disableComponentRevision` | Optimize componentRevision by disabling the creation and gc | `true` |
| `optimize.disableApplicationRevision` | Optimize ApplicationRevision by disabling the creation and gc. | `false` |
| `optimize.disableWorkflowRecorder` | Optimize workflow recorder by disabling the creation and gc. | `false` |
| `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` |
| `featureGates.gzipResourceTracker` | compress ResourceTracker using gzip (good) before being stored. This is reduces network throughput when dealing with huge ResourceTrackers. | `false` |
| `featureGates.zstdResourceTracker` | compress ResourceTracker using zstd (fast and good) before being stored. This is reduces network throughput when dealing with huge ResourceTrackers. Note that zstd will be prioritized if you enable other compression options. | `true` |
| `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` |
| `featureGates.multiStageComponentApply` | if enabled, the multiStageComponentApply feature will be combined with the stage field in TraitDefinition to complete the multi-stage apply. | `false` |
| `featureGates.gzipApplicationRevision` | compress apprev using gzip (good) before being stored. This is reduces network throughput when dealing with huge apprevs. | `false` |
| `featureGates.zstdApplicationRevision` | compress apprev using zstd (fast and good) before being stored. This is reduces network throughput when dealing with huge apprevs. Note that zstd will be prioritized if you enable other compression options. | `true` |
| `featureGates.preDispatchDryRun` | enable dryrun before dispatching resources. Enable this flag can help prevent unsuccessful dispatch resources entering resourcetracker and improve the user experiences of gc but at the cost of increasing network requests. | `true` |
| Name | Description | Value |
| ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `optimize.cachedGvks` | Optimize types of resources to be cached. | `""` |
| `optimize.markWithProb` | Optimize ResourceTracker GC by only run mark with probability. Side effect: outdated ResourceTracker might not be able to be removed immediately. | `0.1` |
| `optimize.disableComponentRevision` | Optimize componentRevision by disabling the creation and gc | `true` |
| `optimize.disableApplicationRevision` | Optimize ApplicationRevision by disabling the creation and gc. | `false` |
| `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` |
| `featureGates.gzipResourceTracker` | compress ResourceTracker using gzip (good) before being stored. This is reduces network throughput when dealing with huge ResourceTrackers. | `false` |
| `featureGates.zstdResourceTracker` | compress ResourceTracker using zstd (fast and good) before being stored. This is reduces network throughput when dealing with huge ResourceTrackers. Note that zstd will be prioritized if you enable other compression options. | `true` |
| `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` |
| `featureGates.multiStageComponentApply` | if enabled, the multiStageComponentApply feature will be combined with the stage field in TraitDefinition to complete the multi-stage apply. | `true` |
| `featureGates.gzipApplicationRevision` | compress apprev using gzip (good) before being stored. This is reduces network throughput when dealing with huge apprevs. | `false` |
| `featureGates.zstdApplicationRevision` | compress apprev using zstd (fast and good) before being stored. This is reduces network throughput when dealing with huge apprevs. Note that zstd will be prioritized if you enable other compression options. | `true` |
| `featureGates.preDispatchDryRun` | enable dryrun before dispatching resources. Enable this flag can help prevent unsuccessful dispatch resources entering resourcetracker and improve the user experiences of gc but at the cost of increasing network requests. | `true` |
| `featureGates.validateComponentWhenSharding` | enable component validation in webhook when sharding mode enabled | `false` |
| `featureGates.disableWebhookAutoSchedule` | disable auto schedule for application mutating webhook when sharding enabled | `false` |
| `featureGates.disableBootstrapClusterInfo` | disable the cluster info bootstrap at the starting of the controller | `false` |
| `featureGates.informerCacheFilterUnnecessaryFields` | filter unnecessary fields for informer cache | `true` |
| `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 |
| ----------------------------------------------------------- | ----------------------------------------------- | -------------------------------- |
| `multicluster.enabled` | Whether to enable multi-cluster | `true` |
| `multicluster.metrics.enabled` | Whether to enable multi-cluster metrics collect | `false` |
| `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-alpha.3` |
| `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` |
| `multicluster.clusterGateway.secureTLS.certManager.enabled` | Whether to enable cert-manager | `false` |
| Name | Description | Value |
| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -------------------------------- |
| `multicluster.enabled` | Whether to enable multi-cluster | `true` |
| `multicluster.metrics.enabled` | Whether to enable multi-cluster metrics collect | `false` |
| `multicluster.clusterGateway.direct` | controller will connect to ClusterGateway directly instead of going to Kubernetes APIServer | `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` |
| `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` |
| `multicluster.clusterGateway.secureTLS.certManager.enabled` | Whether to enable cert-manager | `false` |
### Test parameters
@@ -129,30 +130,31 @@ 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 |
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------- |
| `imagePullSecrets` | Image pull secrets | `[]` |
| `nameOverride` | Override name | `""` |
| `fullnameOverride` | Fullname override | `""` |
| `serviceAccount.create` | Specifies whether a service account should be created | `true` |
| `serviceAccount.annotations` | Annotations to add to the service account | `{}` |
| `serviceAccount.name` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | `nil` |
| `nodeSelector` | Node selector | `{}` |
| `tolerations` | Tolerations | `[]` |
| `affinity` | Affinity | `{}` |
| `rbac.create` | Specifies whether a RBAC role should be created | `true` |
| `logDebug` | Enable debug logs for development purpose | `false` |
| `logFilePath` | If non-empty, write log files in this path | `""` |
| `logFileMaxSize` | Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. | `1024` |
| `kubeClient.qps` | The qps for reconcile clients, default is 100 | `100` |
| `kubeClient.burst` | The burst for reconcile clients, default is 200 | `200` |
| `authentication.enabled` | Enable authentication for application | `false` |
| `authentication.withUser` | Application authentication will impersonate as the request User | `true` |
| `authentication.defaultUser` | Application authentication will impersonate as the User if no user provided in Application | `kubevela:vela-core` |
| `authentication.groupPattern` | Application authentication will impersonate as the request Group that matches the pattern | `kubevela:*` |
| Name | Description | Value |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- |
| `imagePullSecrets` | Image pull secrets | `[]` |
| `nameOverride` | Override name | `""` |
| `fullnameOverride` | Fullname override | `""` |
| `serviceAccount.create` | Specifies whether a service account should be created | `true` |
| `serviceAccount.annotations` | Annotations to add to the service account | `{}` |
| `serviceAccount.name` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | `nil` |
| `nodeSelector` | Node selector | `{}` |
| `tolerations` | Tolerations | `[]` |
| `affinity` | Affinity | `{}` |
| `rbac.create` | Specifies whether a RBAC role should be created | `true` |
| `logDebug` | Enable debug logs for development purpose | `false` |
| `logFilePath` | If non-empty, write log files in this path | `""` |
| `logFileMaxSize` | Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. | `1024` |
| `kubeClient.qps` | The qps for reconcile clients | `400` |
| `kubeClient.burst` | The burst for reconcile clients | `600` |
| `authentication.enabled` | Enable authentication for application | `false` |
| `authentication.withUser` | Application authentication will impersonate as the request User | `true` |
| `authentication.defaultUser` | Application authentication will impersonate as the User if no user provided in Application | `kubevela:vela-core` |
| `authentication.groupPattern` | Application authentication will impersonate as the request Group that matches the pattern | `kubevela:*` |
| `sharding.enabled` | When sharding enabled, the controller will run as master mode. Refer to https://github.com/kubevela/kubevela/blob/master/design/vela-core/sharding.md for details. | `false` |
| `sharding.schedulableShards` | The shards available for scheduling. If empty, dynamic discovery will be used. | `""` |
## Uninstallation

View File

@@ -848,6 +848,7 @@ spec:
x-kubernetes-map-type: atomic
endTime:
format: date-time
nullable: true
type: string
finished:
type: boolean
@@ -2162,6 +2163,8 @@ spec:
inputs:
description: StepInputs defines variable input of WorkflowStep
items:
description: InputItem defines an input variable of
WorkflowStep
properties:
from:
type: string
@@ -2177,6 +2180,8 @@ spec:
description: StepOutputs defines output variable of
WorkflowStep
items:
description: OutputItem defines an output variable
of WorkflowStep
properties:
name:
type: string
@@ -2283,6 +2288,8 @@ spec:
inputs:
description: Inputs is the inputs of the step
items:
description: InputItem defines an input variable
of WorkflowStep
properties:
from:
type: string
@@ -2299,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.
@@ -2306,6 +2318,8 @@ spec:
outputs:
description: Outputs is the outputs of the step
items:
description: OutputItem defines an output variable
of WorkflowStep
properties:
name:
type: string
@@ -2339,6 +2353,8 @@ spec:
inputs:
description: Inputs is the inputs of the step
items:
description: InputItem defines an input
variable of WorkflowStep
properties:
from:
type: string
@@ -2363,6 +2379,8 @@ spec:
description: Outputs is the outputs of the
step
items:
description: OutputItem defines an output
variable of WorkflowStep
properties:
name:
type: string
@@ -2806,6 +2824,7 @@ spec:
x-kubernetes-map-type: atomic
endTime:
format: date-time
nullable: true
type: string
finished:
type: boolean
@@ -4138,6 +4157,7 @@ spec:
inputs:
description: Inputs is the inputs of the step
items:
description: InputItem defines an input variable of WorkflowStep
properties:
from:
type: string
@@ -4153,12 +4173,19 @@ 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
outputs:
description: Outputs is the outputs of the step
items:
description: OutputItem defines an output variable of
WorkflowStep
properties:
name:
type: string
@@ -4189,6 +4216,8 @@ spec:
inputs:
description: Inputs is the inputs of the step
items:
description: InputItem defines an input variable
of WorkflowStep
properties:
from:
type: string
@@ -4212,6 +4241,8 @@ spec:
outputs:
description: Outputs is the outputs of the step
items:
description: OutputItem defines an output variable
of WorkflowStep
properties:
name:
type: string
@@ -4942,6 +4973,7 @@ spec:
x-kubernetes-map-type: atomic
endTime:
format: date-time
nullable: true
type: string
finished:
type: boolean

View File

@@ -774,6 +774,7 @@ spec:
x-kubernetes-map-type: atomic
endTime:
format: date-time
nullable: true
type: string
finished:
type: boolean
@@ -933,6 +934,7 @@ spec:
inputs:
description: StepInputs defines variable input of WorkflowStep
items:
description: InputItem defines an input variable of WorkflowStep
properties:
from:
type: string
@@ -947,6 +949,7 @@ spec:
outputs:
description: StepOutputs defines output variable of WorkflowStep
items:
description: OutputItem defines an output variable of WorkflowStep
properties:
name:
type: string
@@ -1049,6 +1052,7 @@ spec:
inputs:
description: Inputs is the inputs of the step
items:
description: InputItem defines an input variable of WorkflowStep
properties:
from:
type: string
@@ -1064,12 +1068,19 @@ 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
outputs:
description: Outputs is the outputs of the step
items:
description: OutputItem defines an output variable of
WorkflowStep
properties:
name:
type: string
@@ -1100,6 +1111,8 @@ spec:
inputs:
description: Inputs is the inputs of the step
items:
description: InputItem defines an input variable
of WorkflowStep
properties:
from:
type: string
@@ -1123,6 +1136,8 @@ spec:
outputs:
description: Outputs is the outputs of the step
items:
description: OutputItem defines an output variable
of WorkflowStep
properties:
name:
type: string
@@ -1535,6 +1550,7 @@ spec:
x-kubernetes-map-type: atomic
endTime:
format: date-time
nullable: true
type: string
finished:
type: boolean

View File

@@ -1,319 +0,0 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.2
name: envbindings.core.oam.dev
spec:
group: core.oam.dev
names:
categories:
- oam
kind: EnvBinding
listKind: EnvBindingList
plural: envbindings
shortNames:
- envbind
singular: envbinding
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .spec.engine
name: ENGINE
type: string
- jsonPath: .status.phase
name: PHASE
type: string
- jsonPath: .metadata.creationTimestamp
name: AGE
type: date
name: v1alpha1
schema:
openAPIV3Schema:
description: EnvBinding is the Schema for the EnvBinding API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: A EnvBindingSpec defines the desired state of a EnvBinding.
properties:
appTemplate:
description: AppTemplate indicates the application template.
type: object
x-kubernetes-embedded-resource: true
x-kubernetes-preserve-unknown-fields: true
engine:
description: ClusterManagementEngine represents a multi-cluster management
solution
type: string
envs:
items:
description: EnvConfig is the configuration for different environments.
properties:
name:
type: string
patch:
description: EnvPatch specify the parameter configuration for
different environments
properties:
components:
items:
description: ApplicationComponent describe the component
of application
properties:
dependsOn:
items:
type: string
type: array
externalRevision:
description: ExternalRevision specified the component
revisionName
type: string
inputs:
description: StepInputs defines variable input of
WorkflowStep
items:
properties:
from:
type: string
parameterKey:
type: string
required:
- from
- parameterKey
type: object
type: array
name:
type: string
outputs:
description: StepOutputs defines output variable of
WorkflowStep
items:
properties:
name:
type: string
valueFrom:
type: string
required:
- name
- valueFrom
type: object
type: array
properties:
type: object
x-kubernetes-preserve-unknown-fields: true
scopes:
additionalProperties:
type: string
description: scopes in ApplicationComponent defines
the component-level scopes the format is <scope-type:scope-instance-name>
pairs, the key represents type of `ScopeDefinition`
while the value represent the name of scope instance.
type: object
x-kubernetes-preserve-unknown-fields: true
traits:
description: Traits define the trait of one component,
the type must be array to keep the order.
items:
description: ApplicationTrait defines the trait
of application
properties:
properties:
type: object
x-kubernetes-preserve-unknown-fields: true
type:
type: string
required:
- type
type: object
type: array
type:
type: string
required:
- name
- type
type: object
type: array
required:
- components
type: object
placement:
description: EnvPlacement defines the placement rules for an
app.
properties:
clusterSelector:
description: ClusterSelector defines the rules to select
a Cluster resource. Either name or labels is needed.
properties:
labels:
additionalProperties:
type: string
description: Labels defines the label selector to select
the cluster.
type: object
name:
description: Name is the name of the cluster.
type: string
type: object
namespaceSelector:
description: NamespaceSelector defines the rules to select
a Namespace resource. Either name or labels is needed.
properties:
labels:
additionalProperties:
type: string
description: Labels defines the label selector to select
the namespace.
type: object
name:
description: Name is the name of the namespace.
type: string
type: object
type: object
selector:
description: EnvSelector defines which components should this
env contains
properties:
components:
items:
type: string
type: array
type: object
required:
- name
- patch
type: object
type: array
outputResourcesTo:
description: OutputResourcesTo specifies the namespace and name of
a ConfigMap which store the resources rendered after differentiated
configuration
properties:
name:
description: Name of the secret.
type: string
namespace:
description: Namespace of the secret.
type: string
required:
- name
type: object
required:
- appTemplate
- envs
type: object
status:
description: A EnvBindingStatus is the status of EnvBinding
properties:
clusterDecisions:
items:
description: ClusterDecision recorded the mapping of environment
and cluster
properties:
cluster:
type: string
env:
type: string
namespace:
type: string
required:
- env
type: object
type: array
conditions:
description: Conditions of the resource.
items:
description: A Condition that may apply to a resource.
properties:
lastTransitionTime:
description: LastTransitionTime is the last time this condition
transitioned from one status to another.
format: date-time
type: string
message:
description: A Message containing details about this condition's
last transition from one status to another, if any.
type: string
reason:
description: A Reason for this condition's last transition from
one status to another.
type: string
status:
description: Status of this condition; is it currently True,
False, or Unknown?
type: string
type:
description: Type of this condition. At most one of each condition
type may apply to a resource at any point in time.
type: string
required:
- lastTransitionTime
- reason
- status
- type
type: object
type: array
phase:
description: EnvBindingPhase is a label for the condition of a EnvBinding
at the current time
type: string
resourceTracker:
description: ResourceTracker record the status of the ResourceTracker
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of
an entire object, this string should contain a valid JSON/Go
field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen
only to have some well-defined way of referencing a part of
an object. TODO: this design is not final and this field is
subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
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
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@@ -13,6 +13,11 @@ spec:
{{- include "kubevela-cluster-gateway.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "9443"
prometheus.io/scrape: "true"
prometheus.io/scheme: "https"
labels:
{{- include "kubevela-cluster-gateway.selectorLabels" . | nindent 8 }}
spec:
@@ -37,6 +42,7 @@ spec:
- "--tls-cert-file={{ .Values.multicluster.clusterGateway.secureTLS.certPath }}/tls.crt"
- "--tls-private-key-file={{ .Values.multicluster.clusterGateway.secureTLS.certPath }}/tls.key"
{{- end }}
- "--authorization-always-allow-paths=/healthz,/readyz,/livez,/metrics"
image: {{ .Values.imageRegistry }}{{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
imagePullPolicy: {{ .Values.multicluster.clusterGateway.image.pullPolicy }}
resources:
@@ -66,10 +72,19 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{ if .Values.affinity }}
{{- toYaml .Values.affinity | nindent 8 }}
{{ else }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
{{- include "kubevela-cluster-gateway.selectorLabels" . | nindent 20 }}
topologyKey: kubernetes.io/hostname
weight: 100
{{ end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}

View File

@@ -1,5 +1,5 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/apply-application-in-parallel.cue
# Definition source cue file: vela-templates/definitions/deprecated/apply-application-in-parallel.cue
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:

View File

@@ -1,9 +1,10 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/apply-application.cue
# Definition source cue file: vela-templates/definitions/deprecated/apply-application.cue
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Application Delivery
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"

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Application Delivery
definition.oam.dev/description: Apply a specific component and its corresponding traits in application
labels:
custom.definition.oam.dev/scope: Application

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Resource Management
definition.oam.dev/alias: ""
definition.oam.dev/description: Apply deployment with specified image and cmd.
name: apply-deployment
@@ -19,6 +20,7 @@ spec:
)
output: op.#Apply & {
cluster: parameter.cluster
value: {
apiVersion: "apps/v1"
kind: "Deployment"
@@ -28,6 +30,7 @@ spec:
}
spec: {
selector: matchLabels: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"
replicas: parameter.replicas
template: {
metadata: labels: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"
spec: containers: [{
@@ -42,10 +45,12 @@ spec:
}
}
wait: op.#ConditionalWait & {
continue: output.value.status.readyReplicas == 1
continue: output.value.status.readyReplicas == parameter.replicas
}
parameter: {
image: string
image: string
replicas: *1 | int
cluster: *"" | string
cmd?: [...string]
}

View File

@@ -4,9 +4,8 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Resource Management
definition.oam.dev/description: Apply raw kubernetes objects for your workflow steps
labels:
custom.definition.oam.dev/ui-hidden: "true"
name: apply-object
namespace: {{ include "systemDefinitionNamespace" . }}
spec:

View File

@@ -1,9 +1,10 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/apply-remaining.cue
# Definition source cue file: vela-templates/definitions/deprecated/apply-remaining.cue
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Application Delivery
definition.oam.dev/description: Apply remaining components and traits
labels:
custom.definition.oam.dev/deprecated: "true"

View File

@@ -4,9 +4,9 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Terraform
definition.oam.dev/alias: ""
definition.oam.dev/description: Apply terraform configuration in the step
definition.oam.dev/example-url: https://raw.githubusercontent.com/kubevela/workflow/main/examples/workflow-run/apply-terraform-resource.yaml
name: apply-terraform-config
namespace: {{ include "systemDefinitionNamespace" . }}
spec:

View File

@@ -4,9 +4,9 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Terraform
definition.oam.dev/alias: ""
definition.oam.dev/description: Apply terraform provider config
definition.oam.dev/example-url: https://raw.githubusercontent.com/kubevela/workflow/main/examples/workflow-run/apply-terraform-resource.yaml
name: apply-terraform-provider
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
@@ -116,7 +116,7 @@ spec:
#ECProvider: {
type: "ec"
apiKey: *"" | string
name: "ec-provider" | string
name: *"ec-provider" | string
}
#GCPProvider: {
credentials: string

View File

@@ -4,9 +4,9 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: CI Integration
definition.oam.dev/alias: ""
definition.oam.dev/description: Build and push image from git url
definition.oam.dev/example-url: https://raw.githubusercontent.com/kubevela/workflow/main/examples/workflow-run/built-push-image.yaml
name: build-push-image
namespace: {{ include "systemDefinitionNamespace" . }}
spec:

View File

@@ -0,0 +1,56 @@
# 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

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Resource Management
definition.oam.dev/description: clean applied jobs in the cluster
name: clean-jobs
namespace: {{ include "systemDefinitionNamespace" . }}

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Application Delivery
definition.oam.dev/description: Collect service endpoints for the application.
name: collect-service-endpoints
namespace: {{ include "systemDefinitionNamespace" . }}

View File

@@ -72,7 +72,7 @@ spec:
}]
}
}
parameter: *#PatchParams | close({
parameter: #PatchParams | close({
// +usage=Specify the container image for multiple containers
containers: [...#PatchParams]
})

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Config Management
definition.oam.dev/description: Create or update a config
name: create-config
namespace: {{ include "systemDefinitionNamespace" . }}

View File

@@ -12,8 +12,13 @@ spec:
cue:
template: |
output: {
apiVersion: "batch/v1beta1"
kind: "CronJob"
if context.clusterVersion.minor < 25 {
apiVersion: "batch/v1beta1"
}
if context.clusterVersion.minor >= 25 {
apiVersion: "batch/v1"
}
kind: "CronJob"
spec: {
schedule: parameter.schedule
concurrencyPolicy: parameter.concurrencyPolicy
@@ -313,8 +318,5 @@ spec:
failureThreshold: *3 | int
}
workload:
definition:
apiVersion: batch/v1beta1
kind: CronJob
type: cronjobs.batch
type: autodetects.core.oam.dev

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Config Management
definition.oam.dev/description: Delete a config
name: delete-config
namespace: {{ include "systemDefinitionNamespace" . }}

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Application Delivery
definition.oam.dev/description: Wait for the specified Application to complete.
name: depends-on-app
namespace: {{ include "systemDefinitionNamespace" . }}

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Application Delivery
definition.oam.dev/description: Deploy cloud resource and deliver secret to multi clusters.
labels:
custom.definition.oam.dev/scope: Application

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Application Delivery
definition.oam.dev/description: A powerful and unified deploy step for components multi-cluster delivery with policies.
labels:
custom.definition.oam.dev/scope: Application
@@ -26,7 +27,7 @@ spec:
//+usage=If set to false, the workflow will suspend automatically before this step, default to be true.
auto: *true | bool
//+usage=Declare the policies that used for this deployment. If not specified, the components will be deployed to the hub cluster.
policies?: [...string]
policies: *[] | [...string]
//+usage=Maximum number of concurrent delivered components.
parallelism: *5 | int
//+usage=If set false, this step will apply the components with the terraform workload.

View File

@@ -1,5 +1,5 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/deploy2env.cue
# Definition source cue file: vela-templates/definitions/deprecated/deploy2env.cue
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:

View File

@@ -1,5 +1,5 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/deploy2runtime.cue
# Definition source cue file: vela-templates/definitions/deprecated/deploy2runtime.cue
apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:

View File

@@ -4,7 +4,10 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Application Delivery
definition.oam.dev/description: Export data to clusters specified by topology.
labels:
custom.definition.oam.dev/scope: Application
name: export-data
namespace: {{ include "systemDefinitionNamespace" . }}
spec:

View File

@@ -4,7 +4,10 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Application Delivery
definition.oam.dev/description: Export service to clusters specified by topology.
labels:
custom.definition.oam.dev/scope: Application
name: export-service
namespace: {{ include "systemDefinitionNamespace" . }}
spec:

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Resource Management
definition.oam.dev/description: Export data to specified Kubernetes ConfigMap in your workflow.
name: export2config
namespace: {{ include "systemDefinitionNamespace" . }}

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Resource Management
definition.oam.dev/description: Export data to Kubernetes Secret in your workflow.
name: export2secret
namespace: {{ include "systemDefinitionNamespace" . }}

View File

@@ -17,6 +17,7 @@ spec:
template: |
import (
"strconv"
"strings"
)
outputs: service: {
@@ -25,25 +26,70 @@ 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"
}
stage: PostDispatch
status:
customStatus: |-
message: *"" | string
@@ -53,7 +99,10 @@ spec:
}
if service.spec.type == "LoadBalancer" {
status: service.status
isHealth: status != _|_ && status.loadBalancer != _|_ && status.loadBalancer.ingress != _|_ && len(status.loadBalancer.ingress) > 0
isHealth: *false | bool
if status != _|_ if status.loadBalancer != _|_ if status.loadBalancer.ingress != _|_ if len(status.loadBalancer.ingress) > 0 if status.loadBalancer.ingress[0].ip != _|_ {
isHealth: true
}
if !isHealth {
message: "ExternalIP: Pending"
}
@@ -62,10 +111,15 @@ spec:
}
}
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
isHealth: *false | bool
if status != _|_ if status.loadBalancer != _|_ if status.loadBalancer.ingress != _|_ if len(status.loadBalancer.ingress) > 0 if status.loadBalancer.ingress[0].ip != _|_ {
isHealth: true
}
}
if service.spec.type != "LoadBalancer" {
isHealth: true
}

View File

@@ -113,19 +113,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

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Terraform
definition.oam.dev/description: Generate a JDBC connection based on Component of alibaba-rds
name: generate-jdbc-connection
namespace: {{ include "systemDefinitionNamespace" . }}

View File

@@ -27,6 +27,7 @@ spec:
mountPath: parameter.appMountPath
}]
}]
// +patchKey=name
initContainers: [{
name: parameter.name
image: parameter.image

View File

@@ -0,0 +1,77 @@
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/k8s-update-strategy.cue
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/alias: ""
definition.oam.dev/description: Set k8s update strategy for Deployment/DaemonSet/StatefulSet
name: k8s-update-strategy
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- deployments.apps
- statefulsets.apps
- daemonsets.apps
conflictsWith: []
podDisruptive: false
schematic:
cue:
template: |
patch: spec: {
if parameter.targetKind == "Deployment" && parameter.strategy.type != "OnDelete" {
// +patchStrategy=retainKeys
strategy: {
type: parameter.strategy.type
if parameter.strategy.type == "RollingUpdate" {
rollingUpdate: {
maxSurge: parameter.strategy.rollingStrategy.maxSurge
maxUnavailable: parameter.strategy.rollingStrategy.maxUnavailable
}
}
}
}
if parameter.targetKind == "StatefulSet" && parameter.strategy.type != "Recreate" {
// +patchStrategy=retainKeys
updateStrategy: {
type: parameter.strategy.type
if parameter.strategy.type == "RollingUpdate" {
rollingUpdate: partition: parameter.strategy.rollingStrategy.partition
}
}
}
if parameter.targetKind == "DaemonSet" && parameter.strategy.type != "Recreate" {
// +patchStrategy=retainKeys
updateStrategy: {
type: parameter.strategy.type
if parameter.strategy.type == "RollingUpdate" {
rollingUpdate: {
maxSurge: parameter.strategy.rollingStrategy.maxSurge
maxUnavailable: parameter.strategy.rollingStrategy.maxUnavailable
}
}
}
}
}
parameter: {
// +usage=Specify the apiVersion of target
targetAPIVersion: *"apps/v1" | string
// +usage=Specify the kind of target
targetKind: *"Deployment" | "StatefulSet" | "DaemonSet"
// +usage=Specify the strategy of update
strategy: {
// +usage=Specify the strategy type
type: *"RollingUpdate" | "Recreate" | "OnDelete"
// +usage=Specify the parameters of rollong update strategy
rollingStrategy?: {
maxSurge: *"25%" | string
maxUnavailable: *"25%" | string
partition: *0 | int
}
}
}
workloadRefPath: ""

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Config Management
definition.oam.dev/description: List the configs
name: list-config
namespace: {{ include "systemDefinitionNamespace" . }}

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: External Integration
definition.oam.dev/description: Send notifications to Email, DingTalk, Slack, Lark or webhook in your workflow.
name: notification
namespace: {{ include "systemDefinitionNamespace" . }}
@@ -56,44 +57,41 @@ spec:
// +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 | close({
text?: close({
content: string
})
// +usage=msgType can be text, link, mardown, actionCard, feedCard
msgtype: *"text" | "link" | "markdown" | "actionCard" | "feedCard"
link?: *null | close({
#link: {
text?: string
title?: string
messageUrl?: string
picUrl?: string
})
markdown?: *null | close({
}
link?: #link
markdown?: close({
text: string
title: string
})
at?: *null | close({
atMobiles?: *null | [...string]
isAtAll?: bool
at?: close({
atMobiles?: [...string]
isAtAll?: bool
})
actionCard?: *null | close({
actionCard?: close({
text: string
title: string
hideAvatar: string
btnOrientation: string
singleTitle: string
singleURL: string
btns: *null | close([...*null | close({
btns?: [...close({
title: string
actionURL: string
})])
})]
})
feedCard?: *null | close({
links: *null | close([...*null | close({
text?: string
title?: string
messageUrl?: string
picUrl?: string
})])
feedCard?: close({
links: [...#link]
})
}
}
@@ -114,11 +112,11 @@ spec:
// +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 | close([...block])
attachments?: *null | close({
blocks?: *null | close([...block])
color?: string
text: string
blocks?: [...block]
attachments?: close({
blocks?: [...block]
color?: string
})
thread_ts?: string
// +usage=Specify the message text format in markdown for slack notification

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Process Control
definition.oam.dev/description: print message in workflow step status
name: print-message-in-status
namespace: {{ include "systemDefinitionNamespace" . }}

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Config Management
definition.oam.dev/description: Read a config
name: read-config
namespace: {{ include "systemDefinitionNamespace" . }}

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Resource Management
definition.oam.dev/description: Read Kubernetes objects from cluster for your workflow steps
name: read-object
namespace: {{ include "systemDefinitionNamespace" . }}

View File

@@ -13,7 +13,7 @@ spec:
template: |
#PolicyRule: {
// +usage=Specify how to select the targets of the rule
selector: [...#RuleSelector]
selector: #RuleSelector
}
#RuleSelector: {
// +usage=Select resources by component names

View File

@@ -4,9 +4,9 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: External Intergration
definition.oam.dev/alias: ""
definition.oam.dev/description: Send request to the url
definition.oam.dev/example-url: https://raw.githubusercontent.com/kubevela/workflow/main/examples/workflow-run/request.yaml
name: request
namespace: {{ include "systemDefinitionNamespace" . }}
spec:

View File

@@ -17,49 +17,56 @@ spec:
schematic:
cue:
template: |
patch: spec: template: spec: containers: [...{
resources: {
if parameter.cpu != _|_ && parameter.memory != _|_ && parameter.requests == _|_ && parameter.limits == _|_ {
requests: {
cpu: parameter.cpu
memory: parameter.memory
patch: spec: template: spec: {
// +patchKey=name
containers: [{
resources: {
if parameter.cpu != _|_ if parameter.memory != _|_ if parameter.requests == _|_ if parameter.limits == _|_ {
// +patchStrategy=retainKeys
requests: {
cpu: parameter.cpu
memory: parameter.memory
}
// +patchStrategy=retainKeys
limits: {
cpu: parameter.cpu
memory: parameter.memory
}
}
limits: {
cpu: parameter.cpu
memory: parameter.memory
}
}
if parameter.requests != _|_ {
requests: {
cpu: parameter.requests.cpu
memory: parameter.requests.memory
if parameter.requests != _|_ {
// +patchStrategy=retainKeys
requests: {
cpu: parameter.requests.cpu
memory: parameter.requests.memory
}
}
if parameter.limits != _|_ {
// +patchStrategy=retainKeys
limits: {
cpu: parameter.limits.cpu
memory: parameter.limits.memory
}
}
}
if parameter.limits != _|_ {
limits: {
cpu: parameter.limits.cpu
memory: parameter.limits.memory
}
}
}
}]
}]
}
parameter: {
// +usage=Specify the amount of cpu for requests and limits
cpu?: *1 | number
cpu?: *1 | number | string
// +usage=Specify the amount of memory for requests and limits
memory?: *"2048Mi" | =~"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$"
// +usage=Specify the resources in requests
requests?: {
// +usage=Specify the amount of cpu for requests
cpu: *1 | number
cpu: *1 | number | string
// +usage=Specify the amount of memory for requests
memory: *"2048Mi" | =~"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$"
}
// +usage=Specify the resources in limits
limits?: {
// +usage=Specify the amount of cpu for limits
cpu: *1 | number
cpu: *1 | number | string
// +usage=Specify the amount of memory for limits
memory: *"2048Mi" | =~"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$"
}

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Application Delivery
definition.oam.dev/description: Sync secrets created by terraform component to runtime clusters so that runtime clusters can share the created cloud resource.
labels:
custom.definition.oam.dev/scope: Application

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Process Control
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.
name: step-group
namespace: {{ include "systemDefinitionNamespace" . }}

View File

@@ -323,7 +323,7 @@ spec:
envName: string
secretKey: string
}]
mountPath?: string
mountPath: string
subPath?: string
defaultMode: *420 | int
readOnly: *false | bool

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Process Control
definition.oam.dev/description: Suspend the current workflow, it can be resumed by 'vela workflow resume' command.
name: suspend
namespace: {{ include "systemDefinitionNamespace" . }}
@@ -11,8 +12,22 @@ spec:
schematic:
cue:
template: |
import (
"vela/op"
)
suspend: op.#Suspend & {
if parameter.duration != _|_ {
duration: parameter.duration
}
if parameter.message != _|_ {
message: parameter.message
}
}
parameter: {
// +usage=Specify the wait duration time to resume workflow such as "30s", "1min" or "2m15s"
duration?: string
// +usage=The suspend message to show
message?: string
}

View File

@@ -4,8 +4,8 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Scripts & Commands
definition.oam.dev/description: Run a vela command
definition.oam.dev/example-url: https://raw.githubusercontent.com/kubevela/workflow/main/examples/workflow-run/apply-terraform-resource.yaml
name: vela-cli
namespace: {{ include "systemDefinitionNamespace" . }}
spec:

View File

@@ -4,7 +4,8 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
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.
custom.definition.oam.dev/category: External Intergration
definition.oam.dev/description: Send a POST 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

@@ -569,7 +569,13 @@ spec:
observedGeneration: context.output.status.observedGeneration
}
}
isHealth: (context.output.spec.replicas == ready.readyReplicas) && (context.output.spec.replicas == ready.updatedReplicas) && (context.output.spec.replicas == ready.replicas) && (ready.observedGeneration == context.output.metadata.generation || ready.observedGeneration > context.output.metadata.generation)
_isHealth: (context.output.spec.replicas == ready.readyReplicas) && (context.output.spec.replicas == ready.updatedReplicas) && (context.output.spec.replicas == ready.replicas) && (ready.observedGeneration == context.output.metadata.generation || ready.observedGeneration > context.output.metadata.generation)
isHealth: *_isHealth | bool
if context.output.metadata.annotations != _|_ {
if context.output.metadata.annotations["app.oam.dev/disable-health-check"] != _|_ {
isHealth: true
}
}
workload:
definition:
apiVersion: apps/v1

View File

@@ -48,10 +48,12 @@ rules:
- apiGroups: ["flowcontrol.apiserver.k8s.io"]
resources: ["prioritylevelconfigurations", "flowschemas"]
verbs: ["get", "list", "watch"]
- apiGroups: ["authentication.k8s.io"]
resources: ["tokenreviews"]
verbs: ["*"]
- apiGroups: ["authorization.k8s.io"]
resources: ["subjectaccessreviews"]
verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1
@@ -85,6 +87,34 @@ subjects:
namespace: {{ .Release.Namespace }}
{{ end }}
{{ if and .Values.sharding.enabled .Values.authentication.enabled }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "kubevela.fullname" . }}:shard-scheduler
namespace: {{ .Release.Namespace }}
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "kubevela.fullname" . }}:shard-scheduler
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "kubevela.fullname" . }}:shard-scheduler
subjects:
- kind: ServiceAccount
name: {{ include "kubevela.serviceAccountName" . }}
{{ end }}
---
# permissions to do leader election.
apiVersion: rbac.authorization.k8s.io/v1
@@ -183,6 +213,9 @@ spec:
metadata:
labels:
{{- include "kubevela.selectorLabels" . | nindent 8 }}
{{ if .Values.sharding.enabled }}
controller.core.oam.dev/shard-id: master
{{ end }}
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "8080"
@@ -217,12 +250,6 @@ spec:
{{ if ne .Values.optimize.cachedGvks "" }}
- "--optimize-cached-gvks={{ .Values.optimize.cachedGvks }}"
{{ end }}
{{ if not .Values.optimize.resourceTrackerListOp }}
- "--optimize-resource-tracker-list-op=false"
{{ end }}
{{ if .Values.optimize.controllerReconcileLoopReduction }}
- "--optimize-controller-reconcile-loop-reduction"
{{ end }}
{{ if .Values.optimize.markWithProb }}
- "--optimize-mark-with-prob={{ .Values.optimize.markWithProb }}"
{{ end }}
@@ -232,9 +259,6 @@ spec:
{{ if .Values.optimize.disableApplicationRevision }}
- "--optimize-disable-application-revision"
{{ end }}
{{ if .Values.optimize.disableWorkflowRecorder }}
- "--optimize-disable-workflow-recorder"
{{ end }}
{{ if .Values.optimize.enableInMemoryWorkflowContext }}
- "--optimize-enable-in-memory-workflow-context"
{{ end }}
@@ -254,6 +278,12 @@ spec:
- "--oam-spec-ver={{ .Values.OAMSpecVer }}"
{{ if .Values.multicluster.enabled }}
- "--enable-cluster-gateway"
{{ if .Values.multicluster.clusterGateway.direct }}
- "--cluster-gateway-url={{ .Release.Name }}-cluster-gateway-service:9443"
{{ if .Values.multicluster.clusterGateway.secureTLS.enabled }}
- "--cluster-gateway-ca-file=/cluster-gateway-tls-cert/ca"
{{ end }}
{{ end }}
{{ end }}
{{ if .Values.multicluster.metrics.enabled }}
- "--enable-cluster-metrics"
@@ -272,9 +302,13 @@ spec:
- "--feature-gates=ZstdResourceTracker={{- .Values.featureGates.zstdResourceTracker | toString -}}"
- "--feature-gates=ApplyOnce={{- .Values.featureGates.applyOnce | toString -}}"
- "--feature-gates=MultiStageComponentApply= {{- .Values.featureGates.multiStageComponentApply | toString -}}"
- "--feature-gates=GzipApplicationRevision={{- .Values.featureGates.gzipResourceTracker | toString -}}"
- "--feature-gates=ZstdApplicationRevision={{- .Values.featureGates.zstdResourceTracker | toString -}}"
- "--feature-gates=GzipApplicationRevision={{- .Values.featureGates.gzipApplicationRevision | toString -}}"
- "--feature-gates=ZstdApplicationRevision={{- .Values.featureGates.zstdApplicationRevision | toString -}}"
- "--feature-gates=PreDispatchDryRun={{- .Values.featureGates.preDispatchDryRun | toString -}}"
- "--feature-gates=DisableBootstrapClusterInfo={{- .Values.featureGates.disableBootstrapClusterInfo | toString -}}"
- "--feature-gates=InformerCacheFilterUnnecessaryFields={{- .Values.featureGates.informerCacheFilterUnnecessaryFields | toString -}}"
- "--feature-gates=SharedDefinitionStorageForApplicationRevision={{- .Values.featureGates.sharedDefinitionStorageForApplicationRevision | toString -}}"
- "--feature-gates=DisableWorkflowContextConfigMapCache={{- .Values.featureGates.disableWorkflowContextConfigMapCache | toString -}}"
{{ if .Values.authentication.enabled }}
{{ if .Values.authentication.withUser }}
- "--authentication-with-user"
@@ -282,6 +316,12 @@ spec:
- "--authentication-default-user={{ .Values.authentication.defaultUser }}"
- "--authentication-group-pattern={{ .Values.authentication.groupPattern }}"
{{ end }}
{{ if .Values.sharding.enabled }}
- "--enable-sharding"
- "--schedulable-shards={{ .Values.sharding.schedulableShards }}"
- "--feature-gates=ValidateComponentWhenSharding={{- .Values.featureGates.validateComponentWhenSharding | toString -}}"
- "--feature-gates=DisableWebhookAutoSchedule={{- .Values.featureGates.disableWebhookAutoSchedule | toString -}}"
{{ end }}
image: {{ .Values.imageRegistry }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ quote .Values.image.pullPolicy }}
resources:
@@ -310,6 +350,11 @@ spec:
- mountPath: {{ .Values.admissionWebhooks.certificate.mountPath }}
name: tls-cert-vol
readOnly: true
{{ if and .Values.multicluster.enabled .Values.multicluster.clusterGateway.secureTLS.enabled .Values.multicluster.clusterGateway.direct }}
- mountPath: /cluster-gateway-tls-cert
name: tls-cert-vol-cg
readOnly: true
{{ end }}
{{ end }}
{{ if .Values.admissionWebhooks.enabled }}
volumes:
@@ -317,15 +362,30 @@ spec:
secret:
defaultMode: 420
secretName: {{ template "kubevela.fullname" . }}-admission
{{ if and .Values.multicluster.enabled .Values.multicluster.clusterGateway.secureTLS.enabled .Values.multicluster.clusterGateway.direct }}
- name: tls-cert-vol-cg
secret:
defaultMode: 420
secretName: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-v2
{{ end }}
{{ end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{ if .Values.affinity }}
{{- toYaml .Values.affinity | nindent 8 }}
{{ else }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
{{- include "kubevela.selectorLabels" . | nindent 20 }}
topologyKey: kubernetes.io/hostname
weight: 100
{{ end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}

View File

@@ -2,7 +2,7 @@ apiVersion: v1
data:
template: |
import (
"vela/ql"
"vela/ql"
)
parameter: {
@@ -55,9 +55,15 @@ data:
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 pod.object.podIP != _|_ {
podIP: pod.object.status.podIP
}
if pod.object.hostIP != _|_ {
hostIP: pod.object.status.hostIP
}
if pod.object.nodeName != _|_ {
nodeName: pod.object.spec.nodeName
}
}
}
}]

View File

@@ -85,23 +85,17 @@ healthCheck:
## @section KubeVela controller optimization parameters
##@param optimize.cachedGvks Optimize types of resources to be cached.
##@param optimize.resourceTrackerListOp Optimize ResourceTracker List Op by adding index.
##@param optimize.controllerReconcileLoopReduction Optimize ApplicationController reconcile by reducing the number of loops to reconcile application.
##@param optimize.markWithProb Optimize ResourceTracker GC by only run mark with probability. Side effect: outdated ResourceTracker might not be able to be removed immediately.
##@param optimize.disableComponentRevision Optimize componentRevision by disabling the creation and gc
##@param optimize.disableApplicationRevision Optimize ApplicationRevision by disabling the creation and gc.
##@param optimize.disableWorkflowRecorder Optimize workflow recorder by disabling the creation and gc.
##@param optimize.enableInMemoryWorkflowContext Optimize workflow by use in-memory context.
##@param optimize.disableResourceApplyDoubleCheck Optimize workflow by ignoring resource double check after apply.
##@param optimize.enableResourceTrackerDeleteOnlyTrigger Optimize resourcetracker by only trigger reconcile when resourcetracker is deleted.
optimize:
cachedGvks: ""
resourceTrackerListOp: true
controllerReconcileLoopReduction: false
markWithProb: 0.1
disableComponentRevision: true
disableApplicationRevision: false
disableWorkflowRecorder: false
enableInMemoryWorkflowContext: false
disableResourceApplyDoubleCheck: false
enableResourceTrackerDeleteOnlyTrigger: true
@@ -114,26 +108,41 @@ optimize:
##@param featureGates.gzipApplicationRevision compress apprev using gzip (good) before being stored. This is reduces network throughput when dealing with huge apprevs.
##@param featureGates.zstdApplicationRevision compress apprev using zstd (fast and good) before being stored. This is reduces network throughput when dealing with huge apprevs. Note that zstd will be prioritized if you enable other compression options.
##@param featureGates.preDispatchDryRun enable dryrun before dispatching resources. Enable this flag can help prevent unsuccessful dispatch resources entering resourcetracker and improve the user experiences of gc but at the cost of increasing network requests.
##@param featureGates.validateComponentWhenSharding enable component validation in webhook when sharding mode enabled
##@param featureGates.disableWebhookAutoSchedule disable auto schedule for application mutating webhook when sharding enabled
##@param featureGates.disableBootstrapClusterInfo disable the cluster info bootstrap at the starting of the controller
##@param featureGates.informerCacheFilterUnnecessaryFields filter unnecessary fields for informer cache
##@param featureGates.sharedDefinitionStorageForApplicationRevision use definition cache to reduce duplicated definition storage for application revision, must be used with InformerCacheFilterUnnecessaryFields
##@param featureGates.disableWorkflowContextConfigMapCache disable the workflow context's configmap informer cache
##@param
featureGates:
enableLegacyComponentRevision: false
gzipResourceTracker: false
zstdResourceTracker: true
applyOnce: false
multiStageComponentApply: false
multiStageComponentApply: true
gzipApplicationRevision: false
zstdApplicationRevision: true
preDispatchDryRun: true
validateComponentWhenSharding: false
disableWebhookAutoSchedule: false
disableBootstrapClusterInfo: false
informerCacheFilterUnnecessaryFields: true
sharedDefinitionStorageForApplicationRevision: true
disableWorkflowContextConfigMapCache: true
## @section MultiCluster parameters
## @param multicluster.enabled Whether to enable multi-cluster
## @param multicluster.metrics.enabled Whether to enable multi-cluster metrics collect
## @param multicluster.clusterGateway.direct controller will connect to ClusterGateway directly instead of going to Kubernetes APIServer
## @param multicluster.clusterGateway.replicaCount ClusterGateway replica count
## @param multicluster.clusterGateway.port ClusterGateway port
## @param multicluster.clusterGateway.image.repository ClusterGateway image repository
## @param multicluster.clusterGateway.image.tag ClusterGateway image tag
## @param multicluster.clusterGateway.image.pullPolicy ClusterGateway image pull policy
## @param multicluster.clusterGateway.resources.requests.cpu ClusterGateway cpu request
## @param multicluster.clusterGateway.resources.requests.memory ClusterGateway memory request
## @param multicluster.clusterGateway.resources.limits.cpu ClusterGateway cpu limit
## @param multicluster.clusterGateway.resources.limits.memory ClusterGateway memory limit
## @param multicluster.clusterGateway.secureTLS.enabled Whether to enable secure TLS
@@ -144,15 +153,19 @@ multicluster:
metrics:
enabled: false
clusterGateway:
direct: true
replicaCount: 1
port: 9443
image:
repository: oamdev/cluster-gateway
tag: v1.7.0-alpha.3
tag: v1.8.0
pullPolicy: IfNotPresent
resources:
requests:
cpu: 50m
memory: 20Mi
limits:
cpu: 100m
cpu: 500m
memory: 200Mi
secureTLS:
enabled: true
@@ -253,11 +266,11 @@ admissionWebhooks:
enabled: false
revisionHistoryLimit: 3
## @param kubeClient.qps The qps for reconcile clients, default is 100
## @param kubeClient.burst The burst for reconcile clients, default is 200
## @param kubeClient.qps The qps for reconcile clients
## @param kubeClient.burst The burst for reconcile clients
kubeClient:
qps: 100
burst: 200
qps: 400
burst: 600
## @param authentication.enabled Enable authentication for application
## @param authentication.withUser Application authentication will impersonate as the request User
@@ -268,3 +281,9 @@ authentication:
withUser: true
defaultUser: kubevela:vela-core
groupPattern: kubevela:*
## @param sharding.enabled When sharding enabled, the controller will run as master mode. Refer to https://github.com/kubevela/kubevela/blob/master/design/vela-core/sharding.md for details.
## @param sharding.schedulableShards The shards available for scheduling. If empty, dynamic discovery will be used.
sharding:
enabled: false
schedulableShards: ""

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

@@ -848,6 +848,7 @@ spec:
x-kubernetes-map-type: atomic
endTime:
format: date-time
nullable: true
type: string
finished:
type: boolean
@@ -2162,6 +2163,8 @@ spec:
inputs:
description: StepInputs defines variable input of WorkflowStep
items:
description: InputItem defines an input variable of
WorkflowStep
properties:
from:
type: string
@@ -2177,6 +2180,8 @@ spec:
description: StepOutputs defines output variable of
WorkflowStep
items:
description: OutputItem defines an output variable
of WorkflowStep
properties:
name:
type: string
@@ -2283,6 +2288,8 @@ spec:
inputs:
description: Inputs is the inputs of the step
items:
description: InputItem defines an input variable
of WorkflowStep
properties:
from:
type: string
@@ -2299,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.
@@ -2306,6 +2318,8 @@ spec:
outputs:
description: Outputs is the outputs of the step
items:
description: OutputItem defines an output variable
of WorkflowStep
properties:
name:
type: string
@@ -2339,6 +2353,8 @@ spec:
inputs:
description: Inputs is the inputs of the step
items:
description: InputItem defines an input
variable of WorkflowStep
properties:
from:
type: string
@@ -2363,6 +2379,8 @@ spec:
description: Outputs is the outputs of the
step
items:
description: OutputItem defines an output
variable of WorkflowStep
properties:
name:
type: string
@@ -2806,6 +2824,7 @@ spec:
x-kubernetes-map-type: atomic
endTime:
format: date-time
nullable: true
type: string
finished:
type: boolean
@@ -4138,6 +4157,7 @@ spec:
inputs:
description: Inputs is the inputs of the step
items:
description: InputItem defines an input variable of WorkflowStep
properties:
from:
type: string
@@ -4153,12 +4173,19 @@ 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
outputs:
description: Outputs is the outputs of the step
items:
description: OutputItem defines an output variable of
WorkflowStep
properties:
name:
type: string
@@ -4189,6 +4216,8 @@ spec:
inputs:
description: Inputs is the inputs of the step
items:
description: InputItem defines an input variable
of WorkflowStep
properties:
from:
type: string
@@ -4212,6 +4241,8 @@ spec:
outputs:
description: Outputs is the outputs of the step
items:
description: OutputItem defines an output variable
of WorkflowStep
properties:
name:
type: string
@@ -4942,6 +4973,7 @@ spec:
x-kubernetes-map-type: atomic
endTime:
format: date-time
nullable: true
type: string
finished:
type: boolean

View File

@@ -774,6 +774,7 @@ spec:
x-kubernetes-map-type: atomic
endTime:
format: date-time
nullable: true
type: string
finished:
type: boolean
@@ -933,6 +934,7 @@ spec:
inputs:
description: StepInputs defines variable input of WorkflowStep
items:
description: InputItem defines an input variable of WorkflowStep
properties:
from:
type: string
@@ -947,6 +949,7 @@ spec:
outputs:
description: StepOutputs defines output variable of WorkflowStep
items:
description: OutputItem defines an output variable of WorkflowStep
properties:
name:
type: string
@@ -1049,6 +1052,7 @@ spec:
inputs:
description: Inputs is the inputs of the step
items:
description: InputItem defines an input variable of WorkflowStep
properties:
from:
type: string
@@ -1064,12 +1068,19 @@ 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
outputs:
description: Outputs is the outputs of the step
items:
description: OutputItem defines an output variable of
WorkflowStep
properties:
name:
type: string
@@ -1100,6 +1111,8 @@ spec:
inputs:
description: Inputs is the inputs of the step
items:
description: InputItem defines an input variable
of WorkflowStep
properties:
from:
type: string
@@ -1123,6 +1136,8 @@ spec:
outputs:
description: Outputs is the outputs of the step
items:
description: OutputItem defines an output variable
of WorkflowStep
properties:
name:
type: string
@@ -1535,6 +1550,7 @@ spec:
x-kubernetes-map-type: atomic
endTime:
format: date-time
nullable: true
type: string
finished:
type: boolean

View File

@@ -58,10 +58,19 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{ if .Values.affinity }}
{{- toYaml .Values.affinity | nindent 8 }}
{{ else }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
{{- include "kubevela-cluster-gateway.selectorLabels" . | nindent 20 }}
topologyKey: kubernetes.io/hostname
weight: 100
{{ end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Application Delivery
definition.oam.dev/description: Apply a specific component and its corresponding traits in application
labels:
custom.definition.oam.dev/scope: Application

View File

@@ -4,6 +4,7 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Resource Management
definition.oam.dev/alias: ""
definition.oam.dev/description: Apply deployment with specified image and cmd.
name: apply-deployment
@@ -19,6 +20,7 @@ spec:
)
output: op.#Apply & {
cluster: parameter.cluster
value: {
apiVersion: "apps/v1"
kind: "Deployment"
@@ -28,6 +30,7 @@ spec:
}
spec: {
selector: matchLabels: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"
replicas: parameter.replicas
template: {
metadata: labels: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"
spec: containers: [{
@@ -42,10 +45,12 @@ spec:
}
}
wait: op.#ConditionalWait & {
continue: output.value.status.readyReplicas == 1
continue: output.value.status.readyReplicas == parameter.replicas
}
parameter: {
image: string
image: string
replicas: *1 | int
cluster: *"" | string
cmd?: [...string]
}

View File

@@ -4,9 +4,8 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Resource Management
definition.oam.dev/description: Apply raw kubernetes objects for your workflow steps
labels:
custom.definition.oam.dev/ui-hidden: "true"
name: apply-object
namespace: {{ include "systemDefinitionNamespace" . }}
spec:

View File

@@ -4,9 +4,9 @@ apiVersion: core.oam.dev/v1beta1
kind: WorkflowStepDefinition
metadata:
annotations:
custom.definition.oam.dev/category: Terraform
definition.oam.dev/alias: ""
definition.oam.dev/description: Apply terraform configuration in the step
definition.oam.dev/example-url: https://raw.githubusercontent.com/kubevela/workflow/main/examples/workflow-run/apply-terraform-resource.yaml
name: apply-terraform-config
namespace: {{ include "systemDefinitionNamespace" . }}
spec:

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