Compare commits

...

54 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
167 changed files with 5977 additions and 1307 deletions

View File

@@ -17,7 +17,7 @@ jobs:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
fetch-depth: 0

View File

@@ -31,7 +31,7 @@ jobs:
VELA_ROLLOUT_HELM_CHART_NAME: vela-rollout
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Get git revision
id: vars
shell: bash

View File

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

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@ac593985615ec2ede58e132d2e21d2b1cbd6127c
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@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
submodules: true

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@ac593985615ec2ede58e132d2e21d2b1cbd6127c
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 }}

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@ac593985615ec2ede58e132d2e21d2b1cbd6127c
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@ac593985615ec2ede58e132d2e21d2b1cbd6127c
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@ac593985615ec2ede58e132d2e21d2b1cbd6127c
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@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
submodules: true
@@ -88,18 +88,18 @@ jobs:
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@ac593985615ec2ede58e132d2e21d2b1cbd6127c
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 }}
@@ -109,7 +109,7 @@ jobs:
node-version: '14'
- name: Cache Go Dependencies
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
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@ac593985615ec2ede58e132d2e21d2b1cbd6127c
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@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
@@ -164,7 +164,7 @@ jobs:
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
submodules: true
- name: Set up QEMU
@@ -184,7 +184,7 @@ jobs:
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
submodules: true
- name: Set up QEMU

View File

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

View File

@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
name: Check for unapproved licenses
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- 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@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Get the version
id: get_version
run: |
@@ -100,7 +100,7 @@ jobs:
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Get the version
id: get_version
run: |
@@ -163,7 +163,7 @@ jobs:
CAPABILITY_ENDPOINT: oss-cn-beijing.aliyuncs.com
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- 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

@@ -30,12 +30,12 @@ jobs:
name: goreleaser
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
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
cache: true
@@ -83,7 +83,7 @@ jobs:
name: upload-sha256sums
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Update kubectl plugin version in krew-index
uses: rajatjindal/krew-release-bot@92da038bbf995803124a8e50ebd438b2f37bbbb0 # v0.0.43
- name: Update Homebrew formula

View File

@@ -23,7 +23,7 @@ jobs:
steps:
- name: "Checkout code"
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
persist-credentials: false

View File

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

View File

@@ -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@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Get the version
id: get_version

View File

@@ -22,12 +22,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@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
- name: Get the version
id: get_version

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@ac593985615ec2ede58e132d2e21d2b1cbd6127c
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@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f
with:
submodules: true
- name: Cache Go Dependencies
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}

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

@@ -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,31 +75,31 @@ 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.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. | `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` |
| 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
@@ -109,19 +107,20 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --wai
| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -------------------------------- |
| `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 | `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-alpha.3` |
| `multicluster.clusterGateway.image.tag` | ClusterGateway image tag | `v1.8.0` |
| `multicluster.clusterGateway.image.pullPolicy` | ClusterGateway image pull policy | `IfNotPresent` |
| `multicluster.clusterGateway.resources.limits.cpu` | ClusterGateway cpu limit | `100m` |
| `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
| Name | Description | Value |
@@ -131,7 +130,6 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --wai
| `test.k8s.repository` | Test k8s repository | `oamdev/alpine-k8s` |
| `test.k8s.tag` | Test k8s tag | `1.18.2` |
### Common parameters
| Name | Description | Value |
@@ -149,8 +147,8 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --wai
| `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` |
| `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` |

View File

@@ -2306,6 +2306,11 @@ spec:
alias:
type: string
type: object
mode:
description: Mode is only valid for sub steps, it
defines the mode of the sub steps
nullable: true
type: string
name:
description: Name is the unique name of the workflow
step.
@@ -4168,6 +4173,11 @@ spec:
alias:
type: string
type: object
mode:
description: Mode is only valid for sub steps, it defines
the mode of the sub steps
nullable: true
type: string
name:
description: Name is the unique name of the workflow step.
type: string

View File

@@ -1068,6 +1068,11 @@ spec:
alias:
type: string
type: object
mode:
description: Mode is only valid for sub steps, it defines
the mode of the sub steps
nullable: true
type: string
name:
description: Name is the unique name of the workflow step.
type: string

View File

@@ -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

@@ -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

@@ -318,8 +318,5 @@ spec:
failureThreshold: *3 | int
}
workload:
definition:
apiVersion: batch/v1beta1
kind: CronJob
type: cronjobs.batch
type: autodetects.core.oam.dev

View File

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

View File

@@ -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

@@ -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

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

View File

@@ -48,6 +48,9 @@ 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: ["*"]
@@ -256,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 }}
@@ -280,6 +280,9 @@ spec:
- "--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 }}
@@ -303,6 +306,9 @@ spec:
- "--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"
@@ -344,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:
@@ -351,6 +362,12 @@ 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:

View File

@@ -88,7 +88,6 @@ healthCheck:
##@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.
@@ -97,7 +96,6 @@ optimize:
markWithProb: 0.1
disableComponentRevision: true
disableApplicationRevision: false
disableWorkflowRecorder: false
enableInMemoryWorkflowContext: false
disableResourceApplyDoubleCheck: false
enableResourceTrackerDeleteOnlyTrigger: true
@@ -113,6 +111,9 @@ optimize:
##@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
@@ -126,6 +127,9 @@ featureGates:
validateComponentWhenSharding: false
disableWebhookAutoSchedule: false
disableBootstrapClusterInfo: false
informerCacheFilterUnnecessaryFields: true
sharedDefinitionStorageForApplicationRevision: true
disableWorkflowContextConfigMapCache: true
## @section MultiCluster parameters
@@ -137,6 +141,8 @@ featureGates:
## @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
@@ -147,16 +153,19 @@ multicluster:
metrics:
enabled: false
clusterGateway:
direct: false
direct: true
replicaCount: 1
port: 9443
image:
repository: oamdev/cluster-gateway
tag: v1.8.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
@@ -257,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

View File

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

View File

@@ -2306,6 +2306,11 @@ spec:
alias:
type: string
type: object
mode:
description: Mode is only valid for sub steps, it
defines the mode of the sub steps
nullable: true
type: string
name:
description: Name is the unique name of the workflow
step.
@@ -4168,6 +4173,11 @@ spec:
alias:
type: string
type: object
mode:
description: Mode is only valid for sub steps, it defines
the mode of the sub steps
nullable: true
type: string
name:
description: Name is the unique name of the workflow step.
type: string

View File

@@ -1068,6 +1068,11 @@ spec:
alias:
type: string
type: object
mode:
description: Mode is only valid for sub steps, it defines
the mode of the sub steps
nullable: true
type: string
name:
description: Name is the unique name of the workflow step.
type: string

View File

@@ -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

@@ -318,8 +318,5 @@ spec:
failureThreshold: *3 | int
}
workload:
definition:
apiVersion: batch/v1beta1
kind: CronJob
type: cronjobs.batch
type: autodetects.core.oam.dev

View File

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

View File

@@ -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

@@ -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

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

View File

@@ -166,10 +166,8 @@ spec:
- "--use-webhook=true"
- "--webhook-port={{ .Values.webhookService.port }}"
- "--webhook-cert-dir={{ .Values.admissionWebhooks.certificate.mountPath }}"
- "--autogen-workload-definition={{ .Values.admissionWebhooks.autoGenWorkloadDefinition }}"
{{ end }}
- "--health-addr=:{{ .Values.healthCheck.port }}"
- "--apply-once-only={{ .Values.applyOnceOnly }}"
{{ if ne .Values.disableCaps "" }}
- "--disable-caps={{ .Values.disableCaps }}"
{{ end }}
@@ -188,6 +186,7 @@ spec:
- "--max-workflow-step-error-retry-times={{ .Values.workflow.step.errorRetryTimes }}"
- "--feature-gates=EnableSuspendOnFailure={{- .Values.workflow.enableSuspendOnFailure | toString -}}"
- "--feature-gates=AuthenticateApplication={{- .Values.authentication.enabled | toString -}}"
- "--feature-gates=ApplyOnce={{- .Values.featureGates.applyOnce | toString -}}"
{{ if .Values.authentication.enabled }}
{{ if .Values.authentication.withUser }}
- "--authentication-with-user"

View File

@@ -26,9 +26,6 @@ OAMSpecVer: "minimal"
## @param disableCaps Disable capability
disableCaps: "envbinding,rollout"
## @param applyOnceOnly Valid applyOnceOnly values: true/false/on/off/force
applyOnceOnly: "off"
## @param dependCheckWait dependCheckWait is the time to wait for ApplicationConfiguration's dependent-resource ready
dependCheckWait: 30s
@@ -86,6 +83,11 @@ webhookService:
healthCheck:
port: 9440
## @section KubeVela controller optimization parameters
##@param featureGates.applyOnce if enabled, the apply-once feature will be applied to all applications, no state-keep and no resource data storage in ResourceTracker
featureGates:
applyOnce: false
## @section MultiCluster parameters
@@ -95,6 +97,8 @@ healthCheck:
## @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
@@ -106,11 +110,14 @@ multicluster:
port: 9443
image:
repository: oamdev/cluster-gateway
tag: v1.7.0
tag: v1.8.0-alpha.3
pullPolicy: IfNotPresent
resources:
requests:
cpu: 50m
memory: 20Mi
limits:
cpu: 100m
cpu: 500m
memory: 200Mi
secureTLS:
enabled: true

View File

@@ -22,6 +22,7 @@ import (
"time"
"github.com/kubevela/pkg/util/compression"
"github.com/kubevela/pkg/util/k8s"
"github.com/kubevela/pkg/util/singleton"
"k8s.io/apiserver/pkg/util/feature"
"k8s.io/klog/v2"
@@ -55,7 +56,7 @@ func (in *SystemCRDValidationHook) Run(ctx context.Context) error {
feature.DefaultMutableFeatureGate.Enabled(features.GzipApplicationRevision) {
appRev := &v1beta1.ApplicationRevision{}
appRev.Name = fmt.Sprintf("core.pre-check.%d", time.Now().UnixNano())
appRev.Namespace = types.DefaultKubeVelaNS
appRev.Namespace = k8s.GetRuntimeNamespace()
key := client.ObjectKeyFromObject(appRev)
appRev.SetLabels(map[string]string{oam.LabelPreCheck: types.VelaCoreName})
appRev.Spec.Application.Name = appRev.Name

View File

@@ -160,8 +160,9 @@ func run(ctx context.Context, s *options.CoreOptions) error {
// of controller-runtime. Additionally, set this value will affect not only application
// controller but also all other controllers like definition controller. Therefore, for
// functionalities like state-keep, they should be invented in other ways.
NewClient: velaclient.DefaultNewControllerClient,
NewCache: cache.BuildCache(ctx, scheme, &v1beta1.Application{}, &v1beta1.ApplicationRevision{}, &v1beta1.ResourceTracker{}),
NewClient: velaclient.DefaultNewControllerClient,
NewCache: cache.BuildCache(ctx, scheme, &v1beta1.Application{}, &v1beta1.ApplicationRevision{}, &v1beta1.ResourceTracker{}),
ClientDisableCacheFor: cache.NewResourcesToDisableCache(),
})
if err != nil {
klog.ErrorS(err, "Unable to create a controller manager")

View File

@@ -96,10 +96,10 @@ This command requires `docker` in PATH as we'll run openapi-generator in docker.
```shell
# Initialize the SDK, generate API from all definitions,
vela def gen-api --init -f /path/to/def/dir -o /path/to/sdk --lang go
vela def gen-api --init -f /path/to/def/dir -o /path/to/sdk --language go
# Incrementally generate API from definitions
vela def gen-api -f /path/to/def/dir -o /path/to/sdk --lang go
vela def gen-api -f /path/to/def/dir -o /path/to/sdk --language go
```
## Future work

View File

@@ -18,7 +18,7 @@ spec:
mountPath: /test/mount/pvc
- name: test1
mountPath: /test/mount2/pvc
subPath: /sub
subPath: sub
configMap:
- name: test1
mountPath: /test/mount/cm

View File

@@ -18,6 +18,7 @@ package e2e
import (
"context"
"encoding/json"
"fmt"
"strings"
"time"
@@ -31,6 +32,7 @@ import (
"github.com/oam-dev/kubevela/apis/core.oam.dev/v1beta1"
"github.com/oam-dev/kubevela/e2e"
"github.com/oam-dev/kubevela/pkg/addon"
"github.com/oam-dev/kubevela/pkg/utils/common"
)
@@ -176,4 +178,160 @@ var _ = Describe("Addon Test", func() {
Expect(output).To(ContainSubstring("Successfully delete an addon registry my-repo"))
})
})
Context("Enable dependency addon test", func() {
It(" enable mock-dependence-rely without specified clusters when mock-dependence addon is not enabled", func() {
output, err := e2e.Exec("vela addon enable mock-dependence-rely")
Expect(err).NotTo(HaveOccurred())
Expect(output).To(ContainSubstring("enabled successfully."))
Eventually(func(g Gomega) {
app := &v1beta1.Application{}
Expect(k8sClient.Get(context.Background(), types.NamespacedName{Name: "addon-mock-dependence", Namespace: "vela-system"}, app)).Should(Succeed())
topologyPolicyValue := map[string]interface{}{}
for _, policy := range app.Spec.Policies {
if policy.Type == "topology" {
Expect(json.Unmarshal(policy.Properties.Raw, &topologyPolicyValue)).Should(Succeed())
break
}
}
Expect(topologyPolicyValue["clusterLabelSelector"]).Should(Equal(map[string]interface{}{}))
}, 30*time.Second).Should(Succeed())
})
It("enable mock-dependence-rely with specified clusters when mock-dependence addon is not enabled ", func() {
output, err := e2e.Exec("vela addon enable mock-dependence-rely2 --clusters local")
Expect(err).NotTo(HaveOccurred())
Expect(output).To(ContainSubstring("enabled successfully."))
Eventually(func(g Gomega) {
app := &v1beta1.Application{}
Expect(k8sClient.Get(context.Background(), types.NamespacedName{Name: "addon-mock-dependence2", Namespace: "vela-system"}, app)).Should(Succeed())
topologyPolicyValue := map[string]interface{}{}
for _, policy := range app.Spec.Policies {
if policy.Type == "topology" {
Expect(json.Unmarshal(policy.Properties.Raw, &topologyPolicyValue)).Should(Succeed())
break
}
}
Expect(topologyPolicyValue["clusters"]).Should(Equal([]interface{}{"local"}))
}, 30*time.Second).Should(Succeed())
})
It("enable mock-dependence-rely without specified clusters when mock-dependence addon was enabled with specified clusters", func() {
// 1. enable mock-dependence addon with local clusters
output, err := e2e.InteractiveExec("vela addon enable mock-dependence --clusters local myparam=test", func(c *expect.Console) {
_, err = c.SendLine("y")
Expect(err).NotTo(HaveOccurred())
})
Expect(err).NotTo(HaveOccurred())
Expect(output).To(ContainSubstring("enabled successfully."))
Eventually(func(g Gomega) {
// check application render cluster
app := &v1beta1.Application{}
Expect(k8sClient.Get(context.Background(), types.NamespacedName{Name: "addon-mock-dependence", Namespace: "vela-system"}, app)).Should(Succeed())
topologyPolicyValue := map[string]interface{}{}
for _, policy := range app.Spec.Policies {
if policy.Type == "topology" {
Expect(json.Unmarshal(policy.Properties.Raw, &topologyPolicyValue)).Should(Succeed())
break
}
}
Expect(topologyPolicyValue["clusters"]).Should(Equal([]interface{}{"local"}))
Expect(topologyPolicyValue["clusterLabelSelector"]).Should(BeNil())
}, 600*time.Second).Should(Succeed())
// 2. enable mock-dependence-rely addon without clusters
output1, err := e2e.InteractiveExec("vela addon enable mock-dependence-rely", func(c *expect.Console) {
_, err = c.SendLine("y")
Expect(err).NotTo(HaveOccurred())
})
Expect(err).NotTo(HaveOccurred())
Expect(output1).To(ContainSubstring("enabled successfully."))
// 3. enable mock-dependence-rely addon changes the mock-dependence topology policy
Eventually(func(g Gomega) {
app := &v1beta1.Application{}
Expect(k8sClient.Get(context.Background(), types.NamespacedName{Name: "addon-mock-dependence", Namespace: "vela-system"}, app)).Should(Succeed())
topologyPolicyValue := map[string]interface{}{}
for _, policy := range app.Spec.Policies {
if policy.Type == "topology" {
Expect(json.Unmarshal(policy.Properties.Raw, &topologyPolicyValue)).Should(Succeed())
break
}
}
Expect(topologyPolicyValue["clusterLabelSelector"]).Should(Equal(map[string]interface{}{}))
Expect(topologyPolicyValue["clusters"]).Should(BeNil())
}, 30*time.Second).Should(Succeed())
})
It("Test addon dependency with specified clusters", func() {
const clusterName = "k3s-default"
// enable addon
output, err := e2e.InteractiveExec("vela addon enable mock-dependence --clusters local myparam=test", func(c *expect.Console) {
_, err = c.SendLine("y")
Expect(err).NotTo(HaveOccurred())
})
Expect(err).NotTo(HaveOccurred())
Expect(output).To(ContainSubstring("enabled successfully."))
output1, err := e2e.Exec("vela ls -A")
Expect(err).NotTo(HaveOccurred())
Expect(output1).To(ContainSubstring("mock-dependence"))
output2, err := e2e.Exec("vela addon list")
Expect(err).NotTo(HaveOccurred())
Expect(output2).To(ContainSubstring("mock-dependence"))
// check dependence application parameter
Eventually(func(g Gomega) {
// check parameter
sec := &v1.Secret{}
g.Expect(k8sClient.Get(context.Background(), types.NamespacedName{Name: "addon-secret-mock-dependence", Namespace: "vela-system"}, sec)).Should(Succeed())
parameters := map[string]interface{}{}
json.Unmarshal(sec.Data[addon.AddonParameterDataKey], &parameters)
g.Expect(parameters).Should(BeEquivalentTo(map[string]interface{}{
"clusters": []interface{}{"local"},
"myparam": "test",
}))
// check application render cluster
app := &v1beta1.Application{}
Expect(k8sClient.Get(context.Background(), types.NamespacedName{Name: "addon-mock-dependence", Namespace: "vela-system"}, app)).Should(Succeed())
topologyPolicyValue := map[string]interface{}{}
for _, policy := range app.Spec.Policies {
if policy.Type == "topology" {
Expect(json.Unmarshal(policy.Properties.Raw, &topologyPolicyValue)).Should(Succeed())
break
}
}
fluxcdYaml, err1 := e2e.Exec("vela status addon-mock-dependence -n vela-system -oyaml")
Expect(err1).NotTo(HaveOccurred())
Expect(fluxcdYaml).To(ContainSubstring("mock-dependence"))
fluxcdStatus, err2 := e2e.Exec("vela addon status mock-dependence -v")
Expect(err2).NotTo(HaveOccurred())
Expect(fluxcdStatus).To(ContainSubstring("mock-dependence"))
Expect(topologyPolicyValue["clusters"]).Should(Equal([]interface{}{"local"}))
}, 600*time.Second).Should(Succeed())
// enable addon which rely on mock-dependence addon
e2e.InteractiveExec("vela addon enable mock-dependence-rely --clusters local,"+clusterName, func(c *expect.Console) {
_, err = c.SendLine("y")
Expect(err).NotTo(HaveOccurred())
})
// check mock-dependence application parameter
Eventually(func(g Gomega) {
sec := &v1.Secret{}
g.Expect(k8sClient.Get(context.Background(), types.NamespacedName{Name: "addon-secret-mock-dependence", Namespace: "vela-system"}, sec)).Should(Succeed())
parameters := map[string]interface{}{}
json.Unmarshal(sec.Data[addon.AddonParameterDataKey], &parameters)
g.Expect(parameters).Should(BeEquivalentTo(map[string]interface{}{
"clusters": []interface{}{"local", clusterName},
"myparam": "test",
}))
app := &v1beta1.Application{}
Expect(k8sClient.Get(context.Background(), types.NamespacedName{Name: "addon-mock-dependence", Namespace: "vela-system"}, app)).Should(Succeed())
topologyPolicyValue := map[string]interface{}{}
for _, policy := range app.Spec.Policies {
if policy.Type == "topology" {
Expect(json.Unmarshal(policy.Properties.Raw, &topologyPolicyValue)).Should(Succeed())
break
}
}
Expect(topologyPolicyValue["clusters"]).Should(Equal([]interface{}{"local", clusterName}))
}, 30*time.Second).Should(Succeed())
})
})
})

View File

@@ -0,0 +1,3 @@
# mock-dependence-rely
This is an addon template. Check how to build your own addon: https://kubevela.net/docs/platform-engineers/addon/intro

View File

@@ -0,0 +1,25 @@
// We put Definitions in definitions directory.
// References:
// - https://kubevela.net/docs/platform-engineers/cue/definition-edit
// - https://kubevela.net/docs/platform-engineers/addon/intro#definitions-directoryoptional
"mytraitb": {
alias: "mtb"
annotations: {}
attributes: {
appliesToWorkloads: [
"deployments.apps",
"replicasets.apps",
"statefulsets.apps",
]
conflictsWith: []
podDisruptive: false
workloadRefPath: ""
}
description: "My trait description."
labels: {}
type: "trait"
}
template: {
parameter: {param: ""}
outputs: {sample: {}}
}

View File

@@ -0,0 +1,10 @@
description: An addon for testing addon dependency with specified clusters.
icon: ""
invisible: false
name: mock-dependence-rely
tags:
- my-tag
version: 1.0.0
dependencies:
# install controller by helm.
- name: mock-dependence

View File

@@ -0,0 +1,10 @@
// parameter.cue is used to store addon parameters.
//
// You can use these parameters in template.cue or in resources/ by 'parameter.myparam'
//
// For example, you can use parameters to allow the user to customize
// container images, ports, and etc.
parameter: {
// +usage=Custom parameter description
myparam: *"mynsrely" | string
}

View File

@@ -0,0 +1,18 @@
// We put Components in resources directory.
// References:
// - https://kubevela.net/docs/end-user/components/references
// - https://kubevela.net/docs/platform-engineers/addon/intro#resources-directoryoptional
output: {
type: "k8s-objects"
properties: {
objects: [
{
// This creates a plain old Kubernetes namespace
apiVersion: "v1"
kind: "Namespace"
// We can use the parameter defined in parameter.cue like this.
metadata: name: parameter.myparam
},
]
}
}

View File

@@ -0,0 +1,9 @@
package main
output: {
apiVersion: "core.oam.dev/v1beta1"
kind: "Application"
spec: {
components: []
policies: []
}
}

View File

@@ -0,0 +1,3 @@
# mock-dependence-rely2
This is an addon template. Check how to build your own addon: https://kubevela.net/docs/platform-engineers/addon/intro

View File

@@ -0,0 +1,10 @@
description: An addon for testing addon dependency with specified clusters.
icon: ""
invisible: false
name: mock-dependence-rely2
tags:
- my-tag
version: 1.0.0
dependencies:
# install controller by helm.
- name: mock-dependence2

View File

@@ -0,0 +1,4 @@
parameter: {
// +usage=Custom parameter description
myparam: *"mynsrely" | string
}

View File

@@ -0,0 +1,9 @@
package main
output: {
apiVersion: "core.oam.dev/v1beta1"
kind: "Application"
spec: {
components: []
policies: []
}
}

View File

@@ -0,0 +1,3 @@
# mock-dependence
This is an addon template. Check how to build your own addon: https://kubevela.net/docs/platform-engineers/addon/intro

View File

@@ -0,0 +1,25 @@
// We put Definitions in definitions directory.
// References:
// - https://kubevela.net/docs/platform-engineers/cue/definition-edit
// - https://kubevela.net/docs/platform-engineers/addon/intro#definitions-directoryoptional
"mytrait-depend": {
alias: "mt-depend"
annotations: {}
attributes: {
appliesToWorkloads: [
"deployments.apps",
"replicasets.apps",
"statefulsets.apps",
]
conflictsWith: []
podDisruptive: false
workloadRefPath: ""
}
description: "My trait description."
labels: {}
type: "trait"
}
template: {
parameter: {param: ""}
outputs: {sample: {}}
}

View File

@@ -0,0 +1,7 @@
description: An addon for testing addon dependency with specified clusters.
icon: ""
invisible: false
name: mock-dependence
tags:
- my-tag
version: 1.0.0

View File

@@ -0,0 +1,12 @@
// parameter.cue is used to store addon parameters.
//
// You can use these parameters in template.cue or in resources/ by 'parameter.myparam'
//
// For example, you can use parameters to allow the user to customize
// container images, ports, and etc.
parameter: {
// +usage=Custom parameter description
myparam: *"myns" | string
//+usage=Deploy to specified clusters. Leave empty to deploy to all clusters.
clusters?: [...string]
}

View File

@@ -0,0 +1,18 @@
// We put Components in resources directory.
// References:
// - https://kubevela.net/docs/end-user/components/references
// - https://kubevela.net/docs/platform-engineers/addon/intro#resources-directoryoptional
output: {
type: "k8s-objects"
properties: {
objects: [
{
// This creates a plain old Kubernetes namespace
apiVersion: "v1"
kind: "Namespace"
// We can use the parameter defined in parameter.cue like this.
metadata: name: parameter.myparam
},
]
}
}

View File

@@ -0,0 +1,24 @@
package main
_targetNamespace: parameter.myparam
output: {
apiVersion: "core.oam.dev/v1beta1"
kind: "Application"
spec: {
components: [],
policies: [
{
type: "topology"
name: "deploy-mock-dependency-ns"
properties: {
namespace: _targetNamespace
if parameter.clusters != _|_ {
clusters: parameter.clusters
}
if parameter.clusters == _|_ {
clusterLabelSelector: {}
}
}
},
]
}
}

View File

@@ -0,0 +1,3 @@
# mock-dependence2
This is an addon template. Check how to build your own addon: https://kubevela.net/docs/platform-engineers/addon/intro

View File

@@ -0,0 +1,7 @@
description: An addon for testing addon dependency with specified clusters.
icon: ""
invisible: false
name: mock-dependence2
tags:
- my-tag
version: 1.0.0

View File

@@ -0,0 +1,6 @@
parameter: {
// +usage=Custom parameter description
myparam: *"myns" | string
//+usage=Deploy to specified clusters. Leave empty to deploy to all clusters.
clusters?: [...string]
}

View File

@@ -0,0 +1,24 @@
package main
_targetNamespace: parameter.myparam
output: {
apiVersion: "core.oam.dev/v1beta1"
kind: "Application"
spec: {
components: [],
policies: [
{
type: "topology"
name: "deploy-mock-dependency-ns"
properties: {
namespace: _targetNamespace
if parameter.clusters != _|_ {
clusters: parameter.clusters
}
if parameter.clusters == _|_ {
clusterLabelSelector: {}
}
}
},
]
}
}

41
go.mod
View File

@@ -10,7 +10,7 @@ require (
github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8
github.com/alibabacloud-go/cs-20151215/v3 v3.0.32
github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.4
github.com/alibabacloud-go/tea v1.1.19
github.com/alibabacloud-go/tea v1.1.20
github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b
github.com/bluele/gcache v0.0.2
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869
@@ -37,7 +37,7 @@ require (
github.com/gertd/go-pluralize v0.2.1
github.com/getkin/kin-openapi v0.94.0
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-git/go-git/v5 v5.5.1
github.com/go-git/go-git/v5 v5.6.1
github.com/go-logr/logr v1.2.3
github.com/go-resty/resty/v2 v2.7.0
github.com/golang/mock v1.6.0
@@ -50,9 +50,9 @@ require (
github.com/hashicorp/hcl/v2 v2.16.2
github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174
github.com/imdario/mergo v0.3.13
github.com/kubevela/pkg v0.0.0-20230224072506-9ff31b249aa8
github.com/kubevela/pkg v0.0.0-20230316114047-e2b41b377bac
github.com/kubevela/prism v1.7.0-alpha.1
github.com/kubevela/workflow v0.4.1-0.20230227023118-8eae143050d4
github.com/kubevela/workflow v0.5.1-0.20230412142923-1f15ba091699
github.com/kyokomi/emoji v2.2.4+incompatible
github.com/mitchellh/hashstructure/v2 v2.0.2
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
@@ -66,24 +66,24 @@ require (
github.com/onsi/gomega v1.27.0
github.com/openkruise/kruise-api v1.3.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.12.2
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/client_model v0.3.0
github.com/rivo/tview v0.0.0-20221128165837-db36428c92d9
github.com/rogpeppe/go-internal v1.9.0
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.6.0
github.com/spf13/cobra v1.6.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.1
github.com/stretchr/testify v1.8.2
github.com/tidwall/gjson v1.14.4
github.com/wercker/stern v0.0.0-20190705090245-4fa46dd6987f
github.com/wonderflow/cert-manager-api v1.0.4-0.20210304051430-e08aa76f6c5f
github.com/xanzy/go-gitlab v0.80.0
github.com/xlab/treeprint v1.1.0
github.com/xlab/treeprint v1.2.0
go.uber.org/zap v1.21.0 // indirect
golang.org/x/crypto v0.6.0
golang.org/x/oauth2 v0.3.0
golang.org/x/term v0.5.0
golang.org/x/text v0.7.0
golang.org/x/oauth2 v0.6.0
golang.org/x/term v0.6.0
golang.org/x/text v0.8.0
gomodules.xyz/jsonpatch/v2 v2.2.0
gopkg.in/yaml.v3 v3.0.1
gotest.tools v2.2.0+incompatible
@@ -113,6 +113,7 @@ require (
require (
github.com/dave/jennifer v1.6.0
github.com/ettle/strcase v0.1.1
golang.org/x/tools v0.6.0
)
require (
@@ -132,10 +133,10 @@ require (
github.com/Masterminds/squirrel v1.5.3 // indirect
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
github.com/acomagu/bufpipe v1.0.4 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/alessio/shellescape v1.4.1 // indirect
github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4 // indirect
@@ -179,7 +180,7 @@ require (
github.com/gdamore/encoding v1.0.0 // indirect
github.com/go-errors/errors v1.0.1 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-git/go-billy/v5 v5.3.1 // indirect
github.com/go-git/go-billy/v5 v5.4.1 // indirect
github.com/go-gorp/gorp/v3 v3.0.2 // indirect
github.com/go-logr/zapr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
@@ -246,12 +247,13 @@ require (
github.com/opencontainers/image-spec v1.1.0-rc2 // indirect
github.com/openshift/library-go v0.0.0-20221111030555-73ed40c0a938 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pjbgf/sha1cd v0.2.3 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/protocolbuffers/txtpbfmt v0.0.0-20220428173112-74888fd59c2b // indirect
github.com/rivo/uniseg v0.4.3 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/rubenv/sql-migrate v1.1.2 // indirect
github.com/russross/blackfriday v1.6.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
@@ -285,11 +287,10 @@ require (
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.6.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/grpc v1.48.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect

92
go.sum
View File

@@ -112,8 +112,8 @@ github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8 h1:xzYJEypr/85nB
github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/OneOfOne/xxhash v1.2.6/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q=
github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 h1:ra2OtmuW0AE5csawV4YXMNGNQQXvLRps3z2Z59OPO+I=
github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4/go.mod h1:UBYPn8k0D56RtnR8RFQMjmh4KrZzWJ5o7Z9SYjossQ8=
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA=
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g=
github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
@@ -125,8 +125,8 @@ github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/O
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk=
github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4=
github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ=
github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4=
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
@@ -162,8 +162,9 @@ github.com/alibabacloud-go/tea v1.1.0/go.mod h1:IkGyUSX4Ba1V+k4pCtJUc6jDpZLFph9Q
github.com/alibabacloud-go/tea v1.1.7/go.mod h1:/tmnEaQMyb4Ky1/5D+SE1BAsa5zj/KeGOFfwYm3N/p4=
github.com/alibabacloud-go/tea v1.1.8/go.mod h1:/tmnEaQMyb4Ky1/5D+SE1BAsa5zj/KeGOFfwYm3N/p4=
github.com/alibabacloud-go/tea v1.1.17/go.mod h1:nXxjm6CIFkBhwW4FQkNrolwbfon8Svy6cujmKFUq98A=
github.com/alibabacloud-go/tea v1.1.19 h1:Xroq0M+pr0mC834Djj3Fl4ZA8+GGoA0i7aWse1vmgf4=
github.com/alibabacloud-go/tea v1.1.19/go.mod h1:nXxjm6CIFkBhwW4FQkNrolwbfon8Svy6cujmKFUq98A=
github.com/alibabacloud-go/tea v1.1.20 h1:wFK4xEbvGYMtzTyHhIju9D7ecWxvSUdoLO6y4vDLFik=
github.com/alibabacloud-go/tea v1.1.20/go.mod h1:nXxjm6CIFkBhwW4FQkNrolwbfon8Svy6cujmKFUq98A=
github.com/alibabacloud-go/tea-utils v1.3.1/go.mod h1:EI/o33aBfj3hETm4RLiAxF/ThQdSngxrpF8rKUDJjPE=
github.com/alibabacloud-go/tea-utils v1.4.5 h1:h0/6Xd2f3bPE4XHTvkpjwxowIwRCJAJOqY6Eq8f3zfA=
github.com/alibabacloud-go/tea-utils v1.4.5/go.mod h1:KNcT0oXlZZxOXINnZBs6YvgOd5aYp9U67G+E3R8fcQw=
@@ -470,12 +471,13 @@ github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4=
github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E=
github.com/go-git/go-billy/v5 v5.3.1 h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34=
github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4=
github.com/go-git/go-billy/v5 v5.4.1/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg=
github.com/go-git/go-git-fixtures/v4 v4.3.1 h1:y5z6dd3qi8Hl+stezc8p3JxDkoTRqMAlKnXHuzrfjTQ=
github.com/go-git/go-git-fixtures/v4 v4.3.1/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo=
github.com/go-git/go-git/v5 v5.5.1 h1:5vtv2TB5PM/gPM+EvsHJ16hJh4uAkdGcKilcwY7FYwo=
github.com/go-git/go-git/v5 v5.5.1/go.mod h1:uz5PQ3d0gz7mSgzZhSJToM6ALPaKCdSnl58/Xb5hzr8=
github.com/go-git/go-git/v5 v5.6.1 h1:q4ZRqQl4pR/ZJHc1L5CFjGA1a10u76aV1iC+nh+bHsk=
github.com/go-git/go-git/v5 v5.6.1/go.mod h1:mvyoL6Unz0PiTQrGQfSfiLFhBH1c1e84ylC2MDs4ee8=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gorp/gorp/v3 v3.0.2 h1:ULqJXIekoqMx29FI5ekXXFoH1dT2Vc8UhnRzBg+Emz4=
@@ -484,9 +486,11 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o=
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
@@ -888,6 +892,7 @@ github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9q
github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
@@ -945,12 +950,12 @@ github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kubevela/pkg v0.0.0-20230224072506-9ff31b249aa8 h1:oEiMjRn4tCEkL1p0nWC0HzznwesL/0qT9BjcR23CheM=
github.com/kubevela/pkg v0.0.0-20230224072506-9ff31b249aa8/go.mod h1:GilLxt+9L4sU2tLeZAGHga8wiYmjjfPX/Q6JkyuuXSM=
github.com/kubevela/pkg v0.0.0-20230316114047-e2b41b377bac h1:TLQchMx+BRTnHyebDpOWF2RpF2eTczFBtJro3/H9vwI=
github.com/kubevela/pkg v0.0.0-20230316114047-e2b41b377bac/go.mod h1:GilLxt+9L4sU2tLeZAGHga8wiYmjjfPX/Q6JkyuuXSM=
github.com/kubevela/prism v1.7.0-alpha.1 h1:oeZFn1Oy6gxSSFzMTfsWjLOCKaaooMVm1JGNK4j4Mlo=
github.com/kubevela/prism v1.7.0-alpha.1/go.mod h1:AJSDfdA+RkRSnWx3xEcogbmOTpX+l7RSIwqVHxwUtaI=
github.com/kubevela/workflow v0.4.1-0.20230227023118-8eae143050d4 h1:65x5gYdWMjewjFBlFMAPmkWU6iOj4bjAKyPyTW4Yddg=
github.com/kubevela/workflow v0.4.1-0.20230227023118-8eae143050d4/go.mod h1:0W8a7hU5i5f7UUXQPAHvOTHQdKlV/9bIyDZKXF9W8vU=
github.com/kubevela/workflow v0.5.1-0.20230412142923-1f15ba091699 h1:XvHs/8a10AvHnetlGSpylFnx8PFvONTzmR9CAzFAHbY=
github.com/kubevela/workflow v0.5.1-0.20230412142923-1f15ba091699/go.mod h1:+Ah40fwzX9fi/xeWdphew9J4kqfJiGwXw5MDeGPq3IU=
github.com/kylelemons/godebug v0.0.0-20160406211939-eadb3ce320cb/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
@@ -1072,6 +1077,7 @@ github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/mmcloughlin/avo v0.5.0/go.mod h1:ChHFdoV7ql95Wi7vuq2YT1bwCJqiWdZrQ1im3VujLYM=
github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg=
github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc=
github.com/moby/moby v20.10.20+incompatible h1:x7tLy/H63mylLX/1d75N8NCuYcXBqJAzATrMXHie5+I=
@@ -1105,6 +1111,7 @@ github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8m
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
@@ -1212,8 +1219,8 @@ github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1H
github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU=
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pjbgf/sha1cd v0.2.3 h1:uKQP/7QOzNtKYH7UTohZLcjF5/55EnTw0jO/Ru4jZwI=
github.com/pjbgf/sha1cd v0.2.3/go.mod h1:HOK9QrgzdHpbc2Kzip0Q1yi3M2MFGPADtR6HjG65m5M=
github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
@@ -1248,8 +1255,10 @@ github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83A
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34=
github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw=
github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
@@ -1268,8 +1277,9 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2
github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4=
github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE=
github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
@@ -1284,8 +1294,9 @@ github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU=
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo=
github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
github.com/prometheus/prometheus v0.0.0-20180315085919-58e2a31db8de/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s=
github.com/prometheus/prometheus v1.8.2-0.20200110114423-1e64d757f711/go.mod h1:7U90zPoLkWjEIQcy/rweQla82OCTUzxVHE51G3OhJbI=
github.com/prometheus/prometheus v1.8.2-0.20200507164740-ecee9c8abfd1/go.mod h1:S5n0C6tSgdnwWshBUceRx5G1OsjLv/EeZ9t3wIfEtsY=
@@ -1300,6 +1311,8 @@ github.com/rivo/tview v0.0.0-20221128165837-db36428c92d9/go.mod h1:YX2wUZOcJGOIy
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw=
github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
@@ -1377,8 +1390,8 @@ github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJ
github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo=
github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk=
github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g=
github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI=
github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
@@ -1411,8 +1424,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/thanos-io/thanos v0.11.0/go.mod h1:N/Yes7J68KqvmY+xM6J5CJqEvWIvKSR5sqGtmuD6wDc=
github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM=
@@ -1457,8 +1470,8 @@ github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQ
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg=
github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk=
github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0=
github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ=
github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0=
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -1569,6 +1582,7 @@ go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8=
go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
golang.org/x/arch v0.1.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -1610,7 +1624,7 @@ golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -1644,6 +1658,7 @@ golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hM
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI=
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1705,11 +1720,15 @@ golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -1723,8 +1742,9 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.3.0 h1:6l90koy8/LaBLmLu8jpHeHexzMwEita0zFfYlggy2F8=
golang.org/x/oauth2 v0.3.0/go.mod h1:rQrIauxkUhJ6CuwEXwymO2/eh4xz2ZWF1nBkcxS+tGk=
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw=
golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -1835,6 +1855,7 @@ golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -1843,18 +1864,21 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY=
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw=
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180805044716-cb6730876b98/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -1866,8 +1890,9 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/time v0.0.0-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -1943,6 +1968,7 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA=
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

View File

@@ -15,8 +15,36 @@ The `dashboard.json` is a grafana dashboard file that can track several groups o
5. **Run Pressure Test.** Start load test by rendering application templates with different IDs to generate application instances and apply them to Kubernetes at a desired creation speed. Wait for a while (could be hours) and delete them. This is standard progress of the pressure test. More mutating actions could be injected.
6. **Check Result.** You can upload the grafana dashboard file to the Grafana website exposed from your cluster. Then you can check the result of the load test.
## Use of deploy.sh
## Use of application bulk deploy scripts
Run `BEGIN=0 SIZE=1000 SHARD=3 WORKER=6 VERSION=0 bash deploy.sh` to deploy 1000 application (id from 0 to 1000) to 3 shard in 6 parallel threads.
### Setup
Without sharding mode, `SHARD` variable will not be used. You can update application version by setting the `VERSION` variable.
Run `SHARD=3 CLUSTER=2 bash bootstrap.sh`. This will create 3 namespaces `load-test-0`, `load-test-1`, `load-test-2` to local cluster and all managed clusters.
### Deploy Apps
#### Basic
Run `BEGIN=0 SIZE=1000 SHARD=3 WORKER=6 bash deploy.sh` to deploy 1000 application (id from 0 to 1000) to 3 shard in 6 parallel threads.
#### Version Update
By default, the deployed apps will use variable `VERSION=1`. You can set this variable to change the version of applications and test version upgrades.
#### Choose different app templates
Set `TEMPLATE=heavy` will use the `app-templates/heavy.yaml` as the application template to deploy.
#### Multicluster Apps
Set `CLUSTER=3` will inject the `CLUSTER` variable to the app template. You can use `TEMPLATE=multicluster` or `TEMPLATE=region` to make multicluster application delivery.
> To make multicluster load testing environment, you can set up multiple k3d instances and register them in the control plane.
#### QPS
By default, there is no rate limit for the client. If you want to set the QPS for each worker, you can use `QPS=2`.
### Cleanup
Run `SHARD=3 WORKER=4 BEGIN=0 SIZE=1000 bash cleanup.sh` to delete `app-0` to `app-999` from namespace `load-test-0` to `load-test-2` in 4 threads.

View File

@@ -0,0 +1,90 @@
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: app-ID
namespace: load-test-SHARD
labels:
controller.core.oam.dev/scheduled-shard-id: shard-SHARD
spec:
components:
- name: app-ID-vVERSION-c1
type: webservice
properties:
image: nginx
traits:
- type: scaler
properties:
replicas: 0
- name: app-ID-vVERSION-c2
type: webservice
properties:
image: nginx
traits:
- type: scaler
properties:
replicas: 0
- name: app-ID-vVERSION-c3
type: worker
properties:
image: nginx
traits:
- type: scaler
properties:
replicas: 0
- name: secret-ID
type: k8s-objects
properties:
objects:
- apiVersion: v1
kind: Secret
metadata:
name: secret-ID-s1
stringData:
id: "ID"
shard: "SHARD"
- apiVersion: v1
kind: Secret
metadata:
name: secret-ID-s2
stringData:
id: "ID"
shard: "SHARD"
- apiVersion: v1
kind: Secret
metadata:
name: secret-ID-s3
stringData:
id: "ID"
shard: "SHARD"
- apiVersion: v1
kind: ConfigMap
metadata:
name: cm-ID-c1
data:
id: "ID"
shard: "SHARD"
version: "VERSION"
- apiVersion: v1
kind: ConfigMap
metadata:
name: cm-ID-c2
data:
id: "ID"
shard: "SHARD"
version: "VERSION"
- apiVersion: v1
kind: ConfigMap
metadata:
name: cm-ID-c3
data:
id: "ID"
shard: "SHARD"
version: "VERSION"
- apiVersion: v1
kind: ConfigMap
metadata:
name: cm-ID-c4
data:
id: "ID"
shard: "SHARD"
version: "VERSION"

View File

@@ -0,0 +1,41 @@
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: app-ID
namespace: load-test-SHARD
labels:
controller.core.oam.dev/scheduled-shard-id: shard-SHARD
spec:
components:
- name: app-ID-vVERSION-c1
type: webservice
properties:
image: nginx
traits:
- type: scaler
properties:
replicas: 0
- name: secret-ID
type: k8s-objects
properties:
objects:
- apiVersion: v1
kind: ConfigMap
metadata:
name: secret-ID
stringData:
id: "ID"
shard: "SHARD"
- apiVersion: v1
kind: ConfigMap
metadata:
name: cm-ID
data:
id: "ID"
shard: "SHARD"
version: "VERSION"
policies:
- type: topology
name: topology
properties:
clusters: ["cluster-CLUSTER"]

View File

@@ -0,0 +1,42 @@
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: app-ID
namespace: load-test-SHARD
labels:
controller.core.oam.dev/scheduled-shard-id: shard-SHARD
spec:
components:
- name: app-ID-vVERSION-c1
type: webservice
properties:
image: nginx
traits:
- type: scaler
properties:
replicas: 0
- name: secret-ID
type: k8s-objects
properties:
objects:
- apiVersion: v1
kind: Secret
metadata:
name: secret-ID
stringData:
id: "ID"
shard: "SHARD"
- apiVersion: v1
kind: ConfigMap
metadata:
name: cm-ID
data:
id: "ID"
shard: "SHARD"
version: "VERSION"
policies:
- type: topology
name: topology
properties:
clusterLabelSelector:
region: hz-CLUSTER

View File

@@ -0,0 +1,17 @@
#!/bin/bash
SHARD=${SHARD:-3}
for i in $(seq 0 $(expr $SHARD - 1)); do
kubectl create ns load-test-$i
done
for i in $(seq 0 $(expr $SHARD - 1)); do
echo "
apiVersion: v1
kind: Namespace
metadata:
name: load-test-$i
" > /tmp/ns-$i.yaml
kubectl get clustergateways | grep cluster- | awk '{print $1}' | xargs -n1 -P8 vela kube apply -f /tmp/ns-$i.yaml --cluster
done

18
hack/load-test/cleanup.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
SHARD=${SHARD:-3}
BEGIN=${BEGIN:-0}
SIZE=${SIZE:-1000}
WORKER=${WORKER:-8}
run() {
for i in $(seq $(expr $1 + $BEGIN) $WORKER $(expr $BEGIN + $SIZE - 1)); do
kubectl delete app app-$i -n load-test-$(expr $i % $SHARD) --wait=false
done
}
for j in $(seq 0 $WORKER); do
run $j &
done
wait

View File

@@ -4,27 +4,36 @@ BEGIN=${BEGIN:-1}
SIZE=${SIZE:-1000}
WORKER=${WORKER:-6}
VERSION=${VERSION:-1}
CLUSTER=${CLUSTER:-4}
QPS=${QPS:-1}
SHARD=${SHARD:-3}
TEMPLATE=${TEMPLATE:-"light"}
END=$(expr $BEGIN + $SIZE - 1)
waitTime=$(expr 1000 / $QPS)e-3
run() {
for i in $(seq $1 $3 $2); do
sid=$(expr $i % $SHARD)
v=${VERSION}
cat ./app-templates/light.yaml | sed 's/ID/'$i'/g' | sed 's/SHARD/'$sid'/g' | sed 's/VERSION/'$v'/g' | kubectl apply -f -
c=$(expr $i % $CLUSTER)
cat ./app-templates/$TEMPLATE.yaml | \
sed 's/ID/'$i'/g' | \
sed 's/SHARD/'$sid'/g' | \
sed 's/VERSION/'$v'/g' | \
sed 's/CLUSTER/'$c'/g' | \
kubectl apply -f -
echo "worker $4: apply app $i to $sid"
sleep $waitTime
done
echo "worker $4: done"
}
for i in $(seq 0 $(expr $SHARD - 1)); do
kubectl create ns load-test-$i
done
for i in $(seq 1 $WORKER); do
run $(expr $BEGIN + $i - 1) $END $WORKER $i &
done
wait
wait

View File

@@ -33,7 +33,7 @@ config() {
git config --global user.name "kubevela-bot"
}
cloneAndClearRepo() {
cloneAndClearCoreAPI() {
echo "git clone"
if [[ -n "$SSH_DEPLOY_KEY" ]]; then
@@ -42,8 +42,13 @@ cloneAndClearRepo() {
git clone --single-branch --depth 1 https://github.com/$VELA_GO_SDK.git kubevela-go-sdk
fi
echo "Clear kubevela-go-sdk pkg/*"
rm -r kubevela-go-sdk/pkg/*
echo "Clear kubevela-go-sdk pkg/apis/common, pkg/apis/component, pkg/apis/policy, pkg/apis/trait, pkg/apis/workflow-step, pkg/apis/utils, pkg/apis/types.go "
rm -rf kubevela-go-sdk/pkg/apis/common
rm -rf kubevela-go-sdk/pkg/apis/component
rm -rf kubevela-go-sdk/pkg/apis/policy
rm -rf kubevela-go-sdk/pkg/apis/trait
rm -rf kubevela-go-sdk/pkg/apis/workflow-step
rm -rf kubevela-go-sdk/pkg/apis/utils
}
updateRepo() {
@@ -79,7 +84,7 @@ syncRepo() {
main() {
config
cloneAndClearRepo
cloneAndClearCoreAPI
updateRepo
syncRepo
}

View File

@@ -2306,6 +2306,11 @@ spec:
alias:
type: string
type: object
mode:
description: Mode is only valid for sub steps, it
defines the mode of the sub steps
nullable: true
type: string
name:
description: Name is the unique name of the workflow
step.
@@ -4168,6 +4173,11 @@ spec:
alias:
type: string
type: object
mode:
description: Mode is only valid for sub steps, it defines
the mode of the sub steps
nullable: true
type: string
name:
description: Name is the unique name of the workflow step.
type: string

View File

@@ -1068,6 +1068,11 @@ spec:
alias:
type: string
type: object
mode:
description: Mode is only valid for sub steps, it defines
the mode of the sub steps
nullable: true
type: string
name:
description: Name is the unique name of the workflow step.
type: string

View File

@@ -54,6 +54,7 @@ import (
"k8s.io/client-go/rest"
"k8s.io/client-go/util/retry"
"k8s.io/klog/v2"
stringslices "k8s.io/utils/strings/slices"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/yaml"
@@ -999,20 +1000,29 @@ func (h *Installer) getAddonMeta() (map[string]SourceMeta, error) {
// installDependency checks if addon's dependency and install it
func (h *Installer) installDependency(addon *InstallPackage) error {
var dependencies []string
var addonClusters = getClusters(h.args)
for _, dep := range addon.Dependencies {
_, err := FetchAddonRelatedApp(h.ctx, h.cli, dep.Name)
if err == nil {
continue
}
if !apierrors.IsNotFound(err) {
needInstallAddonDep, depClusters, err := checkDependencyNeedInstall(h.ctx, h.cli, dep.Name, addonClusters)
if err != nil {
return err
}
if !needInstallAddonDep {
continue
}
dependencies = append(dependencies, dep.Name)
if h.dryRun {
continue
}
depHandler := *h
depHandler.args = nil
// reset dependency addon clusters parameter
depArgs, depArgsErr := getDependencyArgs(h.ctx, h.cli, dep.Name, depClusters)
if depArgsErr != nil {
return depArgsErr
}
depHandler.args = depArgs
var depAddon *InstallPackage
// try to install the dependent addon from the same registry with the current addon
depAddon, err = h.loadInstallPackage(dep.Name, dep.Version)
@@ -1062,6 +1072,72 @@ func (h *Installer) installDependency(addon *InstallPackage) error {
return nil
}
// checkDependencyNeedInstall checks whether dependency addon needs to be installed on other clusters
func checkDependencyNeedInstall(ctx context.Context, k8sClient client.Client, depName string, addonClusters []string) (bool, []string, error) {
depApp, err := FetchAddonRelatedApp(ctx, k8sClient, depName)
if err != nil {
if !apierrors.IsNotFound(err) {
return false, nil, err
}
// dependent addon is not exist
return true, addonClusters, nil
}
topologyPolicyValue := map[string]interface{}{}
for _, policy := range depApp.Spec.Policies {
if policy.Type == "topology" {
unmarshalErr := json.Unmarshal(policy.Properties.Raw, &topologyPolicyValue)
if unmarshalErr != nil {
return false, nil, unmarshalErr
}
break
}
}
// nil clusters indicates that the dependent addon is installed on all clusters
if topologyPolicyValue["clusters"] == nil {
return false, nil, nil
}
// nil addonClusters indicates the addon will be installed,
// thus we should set the dependent addon's clusters arg to be nil so that it is installed on all clusters
if addonClusters == nil {
return true, nil, nil
}
// Determine whether the dependent addon's existing clusters can cover the new addon's clusters
var needInstallAddonDep = false
var depClusters []string
originClusters := topologyPolicyValue["clusters"].([]interface{})
for _, r := range originClusters {
depClusters = append(depClusters, r.(string))
}
for _, addonCluster := range addonClusters {
if !stringslices.Contains(depClusters, addonCluster) {
depClusters = append(depClusters, addonCluster)
needInstallAddonDep = true
}
}
return needInstallAddonDep, depClusters, nil
}
// getDependencyArgs resets the dependency clusters arg according needed install depClusters
func getDependencyArgs(ctx context.Context, k8sClient client.Client, depName string, depClusters []string) (map[string]interface{}, error) {
depArgs, depArgsErr := GetAddonLegacyParameters(ctx, k8sClient, depName)
if depArgsErr != nil && !apierrors.IsNotFound(depArgsErr) {
return nil, depArgsErr
}
// reset the cluster arg
if depClusters == nil {
// delete clusters args, when render addon, it will use clusterLabelSelector then render addon to all clusters
if depArgs != nil && depArgs[types.ClustersArg] != nil {
delete(depArgs, types.ClustersArg)
}
} else {
if depArgs == nil {
depArgs = map[string]interface{}{}
}
depArgs[types.ClustersArg] = depClusters
}
return depArgs, nil
}
// checkDependency checks if addon's dependency
func (h *Installer) checkDependency(addon *InstallPackage) ([]string, error) {
var app v1beta1.Application

View File

@@ -174,6 +174,107 @@ var _ = Describe("Addon test", func() {
}, 30*time.Second, 300*time.Millisecond).Should(BeNil())
})
It("checkDependencyNeedInstall func test", func() {
// case1: dependency addon not exist, adonClusters is not nil
depAddonName := "legacy-addon"
addonClusters := []string{"cluster1", "cluster2"}
needInstallAddonDep, depClusters, err := checkDependencyNeedInstall(ctx, k8sClient, depAddonName, addonClusters)
Expect(needInstallAddonDep).Should(BeTrue())
Expect(depClusters).Should(Equal(addonClusters))
Expect(err).Should(BeNil())
// case1.1: dependency addon not exist, adonClusters is nil
needInstallAddonDep1, depClusters1, err := checkDependencyNeedInstall(ctx, k8sClient, depAddonName, nil)
Expect(needInstallAddonDep1).Should(BeTrue())
Expect(depClusters1).Should(BeNil())
Expect(err).Should(BeNil())
// case2: dependency addon exist, no topology policy, addonClusters is not nil
app = v1beta1.Application{}
Expect(yaml.Unmarshal([]byte(legacyAppYaml), &app)).Should(BeNil())
app.SetNamespace(testns)
Expect(k8sClient.Create(ctx, &app)).Should(BeNil())
Eventually(func(g Gomega) {
needInstallAddonDep, depClusters, err := checkDependencyNeedInstall(ctx, k8sClient, depAddonName, addonClusters)
Expect(err).Should(BeNil())
Expect(needInstallAddonDep).Should(BeFalse())
Expect(depClusters).Should(BeNil())
}, 30*time.Second).Should(Succeed())
// case3: clusters is nil (no topology policy), addonClusters is nil
needInstallAddonDep2, depClusters2, err := checkDependencyNeedInstall(ctx, k8sClient, depAddonName, nil)
Expect(needInstallAddonDep2).Should(BeFalse())
Expect(depClusters2).Should(BeNil())
Expect(err).Should(BeNil())
// case4: clusters is nil, addonClusters is nil
app = v1beta1.Application{}
Expect(yaml.Unmarshal([]byte(legacy3AppYaml), &app)).Should(BeNil())
app.SetNamespace(testns)
Expect(k8sClient.Create(ctx, &app)).Should(BeNil())
Eventually(func(g Gomega) {
needInstallAddonDep, depClusters, err := checkDependencyNeedInstall(ctx, k8sClient, "legacy-addon3", nil)
Expect(err).Should(BeNil())
Expect(needInstallAddonDep).Should(BeFalse())
Expect(depClusters).Should(BeNil())
}, 60*time.Second).Should(Succeed())
// case5: clusters is not nil, addonClusters is nil,
app = v1beta1.Application{}
Expect(yaml.Unmarshal([]byte(legacy2AppYaml), &app)).Should(BeNil())
app.SetNamespace(testns)
Expect(k8sClient.Create(ctx, &app)).Should(BeNil())
Eventually(func(g Gomega) {
needInstallAddonDep, depClusters, err := checkDependencyNeedInstall(ctx, k8sClient, "legacy-addon2", nil)
Expect(err).Should(BeNil())
Expect(needInstallAddonDep).Should(BeTrue())
Expect(depClusters).Should(BeNil())
}, 60*time.Second).Should(Succeed())
// case6: clusters is [local], addonClusters is ["cluster1", "cluster2"]
Eventually(func(g Gomega) {
needInstallAddonDep, depClusters, err := checkDependencyNeedInstall(ctx, k8sClient, "legacy-addon2", addonClusters)
Expect(err).Should(BeNil())
Expect(needInstallAddonDep).Should(BeTrue())
Expect(depClusters).Should(Equal(append([]string{"local"}, addonClusters...)))
}, 60*time.Second).Should(Succeed())
})
It("getDependencyArgs func test", func() {
// case1: depClusters is nil
depAddonName := "legacy-addon"
depArgs, err := getDependencyArgs(ctx, k8sClient, depAddonName, nil)
Expect(depArgs).Should(BeNil())
Expect(err).Should(BeNil())
// case2: depClusters is not nil
app = v1beta1.Application{}
Expect(yaml.Unmarshal([]byte(legacyAppYaml), &app)).Should(BeNil())
app.SetNamespace(testns)
//Expect(k8sClient.Create(ctx, &app)).Should(BeNil())
depClusters := []string{"cluster1", "cluster2"}
depArgs2, err := getDependencyArgs(ctx, k8sClient, depAddonName, depClusters)
Expect(depArgs2["clusters"]).Should(Equal(depClusters))
Expect(err).Should(BeNil())
// clusters exist, depClusters is nil
sec := v1.Secret{}
Expect(yaml.Unmarshal([]byte(secretYaml), &sec)).Should(BeNil())
Expect(k8sClient.Create(ctx, &sec)).Should(BeNil())
depArgs3, err := getDependencyArgs(ctx, k8sClient, "fluxcd", nil)
Expect(depArgs3).ToNot(BeNil())
Expect(depArgs3["clusters"]).Should(BeNil())
Expect(err).Should(BeNil())
// getArgs throw exception
sec1 := v1.Secret{}
Expect(yaml.Unmarshal([]byte(secretErrorYaml), &sec1)).Should(BeNil())
Expect(k8sClient.Create(ctx, &sec1)).Should(BeNil())
depArgs4, err := getDependencyArgs(ctx, k8sClient, "fluxcd1", nil)
Expect(depArgs4).Should(BeNil())
Expect(err).ToNot(BeNil())
})
It(" determineAddonAppName func test", func() {
app = v1beta1.Application{}
Expect(yaml.Unmarshal([]byte(legacyAppYaml), &app)).Should(BeNil())
@@ -577,6 +678,60 @@ spec:
properties:
image: crccheck/hello-world
port: 8000
`
legacy2AppYaml = `apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: legacy-addon2
spec:
components:
- name: express-server
type: webservice
properties:
image: crccheck/hello-world
port: 8000
policies:
- name: target-default
type: topology
properties:
clusters: ["local"]
namespace: "default"
`
legacy3AppYaml = `apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: legacy-addon3
spec:
components:
- name: express-server
type: webservice
properties:
image: crccheck/hello-world
port: 8000
policies:
- name: target-default
type: topology
properties:
clusterLabelSelector: {}
namespace: "default"
`
secretYaml = `apiVersion: v1
data:
addonParameterDataKey: eyJjbHVzdGVycyI6WyJsb2NhbCIsInZlbGEtbTEiXX0K
kind: Secret
metadata:
name: addon-secret-fluxcd
namespace: vela-system
type: Opaque
`
secretErrorYaml = `apiVersion: v1
data:
addonParameterDataKey: eyJjbHVzdGVycyI6WyJsb2NhbCIsInZlbGEtbTEiXQo=
kind: Secret
metadata:
name: addon-secret-fluxcd1
namespace: vela-system
type: Opaque
`
deployYaml = `apiVersion: apps/v1
kind: Deployment

View File

@@ -83,17 +83,21 @@ type WholeAddonPackage struct {
// Meta defines the format for a single addon
type Meta struct {
Name string `json:"name" validate:"required"`
Version string `json:"version"`
Description string `json:"description"`
Icon string `json:"icon"`
URL string `json:"url,omitempty"`
Tags []string `json:"tags,omitempty"`
Name string `json:"name" validate:"required"`
Version string `json:"version"`
Description string `json:"description"`
Icon string `json:"icon"`
URL string `json:"url,omitempty"`
Tags []string `json:"tags,omitempty"`
// UXPlugins used for velaux plugins download/install with the use of addon registry.
UXPlugins map[string]string `json:"uxPlugins,omitempty"`
DeployTo *DeployTo `json:"deployTo,omitempty"`
Dependencies []*Dependency `json:"dependencies,omitempty"`
NeedNamespace []string `json:"needNamespace,omitempty"`
Invisible bool `json:"invisible"`
SystemRequirements *SystemRequirements `json:"system,omitempty"`
// Annotations used for addon maintainers to add their own description or extensions to metadata.
Annotations map[string]string `json:"annotations,omitempty"`
}
// DeployTo defines where the addon to deploy to

View File

@@ -311,9 +311,9 @@ func (p *Parser) GenerateAppFileFromRevision(appRev *v1beta1.ApplicationRevision
appfile.RelatedWorkflowStepDefinitions[workflowStep.Type] = def
}
appRev.Spec.WorkflowStepDefinitions = make(map[string]v1beta1.WorkflowStepDefinition)
appRev.Spec.WorkflowStepDefinitions = make(map[string]*v1beta1.WorkflowStepDefinition)
for name, def := range appfile.RelatedWorkflowStepDefinitions {
appRev.Spec.WorkflowStepDefinitions[name] = *def
appRev.Spec.WorkflowStepDefinitions[name] = def
}
}

View File

@@ -443,8 +443,7 @@ patch: spec: replicas: parameter.replicas
that := appfile.AppRevision.Spec.WorkflowStepDefinitions
for i, w := range this {
thatW := that[i]
if !reflect.DeepEqual(*w, thatW) {
fmt.Printf("appfile wsd:%s apprev wsd%s", (*w).Name, thatW.Name)
if !reflect.DeepEqual(w, thatW) {
return false
}
}
@@ -474,7 +473,7 @@ patch: spec: replicas: parameter.replicas
that := appfile.AppRevision.Spec.WorkflowStepDefinitions
for i, w := range this {
thatW := that[i]
if !reflect.DeepEqual(*w, thatW) {
if !reflect.DeepEqual(w, thatW) {
fmt.Printf("appfile wsd:%s apprev wsd%s", (*w).Name, thatW.Name)
return false
}

View File

@@ -22,6 +22,7 @@ import (
"fmt"
"strings"
"github.com/kubevela/pkg/multicluster"
"github.com/pkg/errors"
kerrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -70,6 +71,7 @@ type Template struct {
// It returns a helper struct, Template, which will be used for further
// processing.
func LoadTemplate(ctx context.Context, dm discoverymapper.DiscoveryMapper, cli client.Reader, capName string, capType types.CapType) (*Template, error) {
ctx = multicluster.WithCluster(ctx, multicluster.Local)
// Application Controller only load template from ComponentDefinition and TraitDefinition
switch capType {
case types.TypeComponentDefinition, types.TypeWorkload:

View File

@@ -62,7 +62,7 @@ func TestParseWorkloadFromRevisionAndClient(t *testing.T) {
td := &v1beta1.TraitDefinition{ObjectMeta: metav1.ObjectMeta{Name: "tr"}}
require.NoError(t, cli.Create(ctx, cd))
require.NoError(t, cli.Create(ctx, td))
appRev.Spec.TraitDefinitions = map[string]v1beta1.TraitDefinition{"internal": {}}
appRev.Spec.TraitDefinitions = map[string]*v1beta1.TraitDefinition{"internal": {}}
_, err := p.ParseWorkloadFromRevisionAndClient(ctx, comp, appRev)
require.NoError(t, err)

261
pkg/cache/informer.go vendored Normal file
View File

@@ -0,0 +1,261 @@
/*
Copyright 2023 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package cache
import (
"context"
"sync"
"time"
"github.com/kubevela/pkg/util/k8s"
"github.com/kubevela/pkg/util/runtime"
"github.com/kubevela/pkg/util/singleton"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/sets"
utilfeature "k8s.io/apiserver/pkg/util/feature"
kcache "k8s.io/client-go/tools/cache"
"k8s.io/klog/v2"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/client"
"github.com/oam-dev/kubevela/apis/core.oam.dev/v1beta1"
ctrlutils "github.com/oam-dev/kubevela/pkg/controller/utils"
"github.com/oam-dev/kubevela/pkg/features"
)
var (
// ApplicationRevisionDefinitionCachePruneDuration the prune duration for application revision definition cache
ApplicationRevisionDefinitionCachePruneDuration = time.Hour
)
// ObjectCacheEntry entry for object cache
type ObjectCacheEntry[T any] struct {
ptr *T
refs sets.String
lastAccessed time.Time
}
// ObjectCache cache for objects
type ObjectCache[T any] struct {
mu sync.RWMutex
objects map[string]*ObjectCacheEntry[T]
}
// NewObjectCache create an object cache
func NewObjectCache[T any]() *ObjectCache[T] {
return &ObjectCache[T]{
objects: map[string]*ObjectCacheEntry[T]{},
}
}
// Get retrieve the cache entry
func (in *ObjectCache[T]) Get(hash string) *T {
in.mu.RLock()
defer in.mu.RUnlock()
if entry, found := in.objects[hash]; found {
return entry.ptr
}
return nil
}
// Add insert cache entry with ref, return the ptr of the entry
func (in *ObjectCache[T]) Add(hash string, obj *T, ref string) *T {
in.mu.Lock()
defer in.mu.Unlock()
if entry, found := in.objects[hash]; found {
entry.refs.Insert(ref)
entry.lastAccessed = time.Now()
return entry.ptr
}
in.objects[hash] = &ObjectCacheEntry[T]{
ptr: obj,
refs: sets.NewString(ref),
lastAccessed: time.Now(),
}
return obj
}
// DeleteRef delete ref for an obj
func (in *ObjectCache[T]) DeleteRef(hash string, ref string) {
in.mu.Lock()
defer in.mu.Unlock()
if entry, found := in.objects[hash]; found {
entry.refs.Delete(ref)
if entry.refs.Len() == 0 {
delete(in.objects, hash)
}
}
}
// Remap relocate the object ptr with given ref
func (in *ObjectCache[T]) Remap(m map[string]*T, ref string) {
for key, o := range m {
if hash, err := ctrlutils.ComputeSpecHash(o); err == nil {
m[key] = in.Add(hash, o, ref)
}
}
}
// Unmap drop all the hash object from the map
func (in *ObjectCache[T]) Unmap(m map[string]*T, ref string) {
for _, o := range m {
if hash, err := ctrlutils.ComputeSpecHash(o); err == nil {
in.DeleteRef(hash, ref)
}
}
}
// Size get the size of the cache
func (in *ObjectCache[T]) Size() int {
in.mu.RLock()
defer in.mu.RUnlock()
return len(in.objects)
}
// Prune remove outdated cache, return the pruned count
func (in *ObjectCache[T]) Prune(outdated time.Duration) int {
in.mu.Lock()
defer in.mu.Unlock()
cnt := 0
for key, entry := range in.objects {
if time.Now().After(entry.lastAccessed.Add(outdated)) {
delete(in.objects, key)
cnt++
}
}
return cnt
}
// DefinitionCache cache for definitions
type DefinitionCache struct {
ComponentDefinitionCache *ObjectCache[v1beta1.ComponentDefinition]
TraitDefinitionCache *ObjectCache[v1beta1.TraitDefinition]
WorkflowStepDefinitionCache *ObjectCache[v1beta1.WorkflowStepDefinition]
}
// NewDefinitionCache create DefinitionCache
func NewDefinitionCache() *DefinitionCache {
return &DefinitionCache{
ComponentDefinitionCache: NewObjectCache[v1beta1.ComponentDefinition](),
TraitDefinitionCache: NewObjectCache[v1beta1.TraitDefinition](),
WorkflowStepDefinitionCache: NewObjectCache[v1beta1.WorkflowStepDefinition](),
}
}
// RemapRevision remap all definitions in the given revision
func (in *DefinitionCache) RemapRevision(rev *v1beta1.ApplicationRevision) {
ref := client.ObjectKeyFromObject(rev).String()
in.ComponentDefinitionCache.Remap(rev.Spec.ComponentDefinitions, ref)
in.TraitDefinitionCache.Remap(rev.Spec.TraitDefinitions, ref)
in.WorkflowStepDefinitionCache.Remap(rev.Spec.WorkflowStepDefinitions, ref)
}
// UnmapRevision unmap definitions from the provided revision by the given ref
func (in *DefinitionCache) UnmapRevision(rev *v1beta1.ApplicationRevision) {
ref := client.ObjectKeyFromObject(rev).String()
in.ComponentDefinitionCache.Unmap(rev.Spec.ComponentDefinitions, ref)
in.TraitDefinitionCache.Unmap(rev.Spec.TraitDefinitions, ref)
in.WorkflowStepDefinitionCache.Unmap(rev.Spec.WorkflowStepDefinitions, ref)
}
// Start clear cache every duration
func (in *DefinitionCache) Start(ctx context.Context, store cache.Cache, duration time.Duration) {
informer := runtime.Must(store.GetInformer(ctx, &v1beta1.ApplicationRevision{}))
informer.AddEventHandler(kcache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
if rev, ok := obj.(*v1beta1.ApplicationRevision); ok {
in.RemapRevision(rev)
}
},
UpdateFunc: func(oldObj, newObj interface{}) {
if rev, ok := oldObj.(*v1beta1.ApplicationRevision); ok {
in.UnmapRevision(rev)
}
if rev, ok := newObj.(*v1beta1.ApplicationRevision); ok {
in.RemapRevision(rev)
}
},
DeleteFunc: func(obj interface{}) {
if rev, ok := obj.(*v1beta1.ApplicationRevision); ok {
in.UnmapRevision(rev)
}
},
})
for {
select {
case <-ctx.Done():
return
default:
t0 := time.Now()
compDefPruned := in.ComponentDefinitionCache.Prune(duration)
traitDefPruned := in.TraitDefinitionCache.Prune(duration)
wsDefPruned := in.WorkflowStepDefinitionCache.Prune(duration)
klog.Infof("DefinitionCache prune finished. ComponentDefinition: %d(-%d), TraitDefinition: %d(-%d), WorkflowStepDefinition: %d(-%d). Time cost: %d ms.",
in.ComponentDefinitionCache.Size(), compDefPruned,
in.TraitDefinitionCache.Size(), traitDefPruned,
in.WorkflowStepDefinitionCache.Size(), wsDefPruned,
time.Since(t0).Microseconds())
time.Sleep(duration)
}
}
}
// DefaultDefinitionCache the default definition cache
var DefaultDefinitionCache = singleton.NewSingleton(NewDefinitionCache)
func filterUnnecessaryField(o client.Object) {
_ = k8s.DeleteAnnotation(o, "kubectl.kubernetes.io/last-applied-configuration")
o.SetManagedFields(nil)
}
func wrapTransformFunc[T client.Object](fn func(T)) kcache.TransformFunc {
return func(i interface{}) (interface{}, error) {
if o, ok := i.(T); ok {
filterUnnecessaryField(o)
fn(o)
return o, nil
}
return i, nil
}
}
// AddInformerTransformFuncToCacheOption add informer transform func to cache option
// This will filter out the unnecessary fields for cached objects and use definition cache
// to reduce the duplicated storage of same definitions
func AddInformerTransformFuncToCacheOption(opts *cache.Options) {
if utilfeature.DefaultMutableFeatureGate.Enabled(features.InformerCacheFilterUnnecessaryFields) {
if opts.TransformByObject == nil {
opts.TransformByObject = map[client.Object]kcache.TransformFunc{}
}
opts.TransformByObject[&v1beta1.ApplicationRevision{}] = wrapTransformFunc(func(rev *v1beta1.ApplicationRevision) {
if utilfeature.DefaultMutableFeatureGate.Enabled(features.SharedDefinitionStorageForApplicationRevision) {
DefaultDefinitionCache.Get().RemapRevision(rev)
}
})
opts.TransformByObject[&v1beta1.Application{}] = wrapTransformFunc(func(app *v1beta1.Application) {})
opts.TransformByObject[&v1beta1.ResourceTracker{}] = wrapTransformFunc(func(rt *v1beta1.ResourceTracker) {})
}
}
// NewResourcesToDisableCache get ClientDisableCacheFor for building controller
func NewResourcesToDisableCache() []client.Object {
var objs []client.Object
if utilfeature.DefaultMutableFeatureGate.Enabled(features.DisableWorkflowContextConfigMapCache) {
objs = append(objs, &corev1.ConfigMap{})
}
return objs
}

View File

@@ -22,11 +22,13 @@ import (
"github.com/kubevela/pkg/controller/sharding"
"github.com/kubevela/pkg/util/k8s"
"k8s.io/apimachinery/pkg/runtime"
utilfeature "k8s.io/apiserver/pkg/util/feature"
"k8s.io/client-go/rest"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/client"
"github.com/oam-dev/kubevela/apis/core.oam.dev/v1beta1"
"github.com/oam-dev/kubevela/pkg/features"
"github.com/oam-dev/kubevela/pkg/oam"
)
@@ -42,7 +44,9 @@ var (
// BuildCache if optimize-list-op enabled, ResourceTracker and ApplicationRevision will be cached by
// application namespace & name
func BuildCache(ctx context.Context, scheme *runtime.Scheme, shardingObjects ...client.Object) cache.NewCacheFunc {
fn := sharding.BuildCache(scheme, shardingObjects...)
opts := cache.Options{Scheme: scheme}
AddInformerTransformFuncToCacheOption(&opts)
fn := sharding.BuildCacheWithOptions(opts, shardingObjects...)
return func(config *rest.Config, opts cache.Options) (cache.Cache, error) {
c, err := fn(config, opts)
if err != nil {
@@ -60,6 +64,9 @@ func BuildCache(ctx context.Context, scheme *runtime.Scheme, shardingObjects ...
return nil, err
}
}
if utilfeature.DefaultMutableFeatureGate.Enabled(features.SharedDefinitionStorageForApplicationRevision) {
go DefaultDefinitionCache.Get().Start(ctx, c, ApplicationRevisionDefinitionCachePruneDuration)
}
return c, nil
}
}

View File

@@ -1434,6 +1434,111 @@ var _ = Describe("Test Application Controller", func() {
Expect(checkApp.Status.Workflow.Mode).Should(BeEquivalentTo(fmt.Sprintf("%s-%s", workflowv1alpha1.WorkflowModeDAG, workflowv1alpha1.WorkflowModeStep)))
})
It("application with mode in workflow step group", func() {
ns := corev1.Namespace{
ObjectMeta: metav1.ObjectMeta{
Name: "app-with-group-mode",
},
}
Expect(k8sClient.Create(ctx, &ns)).Should(BeNil())
healthComponentDef := &v1beta1.ComponentDefinition{}
hCDefJson, _ := yaml.YAMLToJSON([]byte(cdDefWithHealthStatusYaml))
Expect(json.Unmarshal(hCDefJson, healthComponentDef)).Should(BeNil())
healthComponentDef.Name = "worker-with-health"
healthComponentDef.Namespace = "app-with-group-mode"
Expect(k8sClient.Create(ctx, healthComponentDef)).Should(BeNil())
app := &v1beta1.Application{
TypeMeta: metav1.TypeMeta{
Kind: "Application",
APIVersion: "core.oam.dev/v1beta1",
},
ObjectMeta: metav1.ObjectMeta{
Name: "app-with-group-mode",
Namespace: "app-with-group-mode",
},
Spec: v1beta1.ApplicationSpec{
Components: []common.ApplicationComponent{
{
Name: "myweb1",
Type: "worker-with-health",
Properties: &runtime.RawExtension{Raw: []byte(`{"cmd":["sleep","1000"],"image":"busybox","lives": "i am lives","enemies": "empty"}`)},
},
{
Name: "myweb3",
Type: "worker",
Properties: &runtime.RawExtension{Raw: []byte(`{"cmd":["sleep","1000"],"image":"busybox"}`)},
},
{
Name: "myweb2",
Type: "worker-with-health",
Properties: &runtime.RawExtension{Raw: []byte(`{"cmd":["sleep","1000"],"image":"busybox","lives": "i am lives","enemies": "empty"}`)},
},
},
Workflow: &v1beta1.Workflow{
Mode: &workflowv1alpha1.WorkflowExecuteMode{
Steps: workflowv1alpha1.WorkflowModeDAG,
},
Steps: []workflowv1alpha1.WorkflowStep{
{
WorkflowStepBase: workflowv1alpha1.WorkflowStepBase{
Name: "myweb1",
Type: "apply-component",
Properties: &runtime.RawExtension{Raw: []byte(`{"component":"myweb1"}`)},
},
},
{
WorkflowStepBase: workflowv1alpha1.WorkflowStepBase{
Name: "myweb2",
Type: "step-group",
},
Mode: workflowv1alpha1.WorkflowModeStep,
SubSteps: []workflowv1alpha1.WorkflowStepBase{
{
Name: "myweb2-sub1",
Type: "apply-component",
Properties: &runtime.RawExtension{Raw: []byte(`{"component":"myweb2"}`)},
},
{
Name: "myweb2-sub2",
Type: "apply-component",
Properties: &runtime.RawExtension{Raw: []byte(`{"component":"myweb3"}`)},
},
},
},
},
},
},
}
Expect(k8sClient.Create(context.Background(), app)).Should(BeNil())
appKey := types.NamespacedName{Namespace: ns.Name, Name: app.Name}
testutil.ReconcileOnceAfterFinalizer(reconciler, reconcile.Request{NamespacedName: appKey})
expDeployment := &v1.Deployment{}
web3Key := types.NamespacedName{Namespace: ns.Name, Name: "myweb3"}
Expect(k8sClient.Get(ctx, web3Key, expDeployment)).Should(util.NotFoundMatcher{})
web1Key := types.NamespacedName{Namespace: ns.Name, Name: "myweb1"}
Expect(k8sClient.Get(ctx, web1Key, expDeployment)).Should(BeNil())
expDeployment.Status.Replicas = 1
expDeployment.Status.ReadyReplicas = 1
Expect(k8sClient.Status().Update(ctx, expDeployment)).Should(BeNil())
web2Key := types.NamespacedName{Namespace: ns.Name, Name: "myweb2"}
Expect(k8sClient.Get(ctx, web2Key, expDeployment)).Should(BeNil())
expDeployment.Status.Replicas = 1
expDeployment.Status.ReadyReplicas = 1
Expect(k8sClient.Status().Update(ctx, expDeployment)).Should(BeNil())
testutil.ReconcileOnce(reconciler, reconcile.Request{NamespacedName: appKey})
Expect(k8sClient.Get(ctx, web3Key, expDeployment)).Should(BeNil())
checkApp := &v1beta1.Application{}
Expect(k8sClient.Get(ctx, appKey, checkApp)).Should(BeNil())
Expect(checkApp.Status.Phase).Should(BeEquivalentTo(common.ApplicationRunning))
Expect(checkApp.Status.Workflow.Mode).Should(BeEquivalentTo(fmt.Sprintf("%s-%s", workflowv1alpha1.WorkflowModeDAG, workflowv1alpha1.WorkflowModeDAG)))
})
It("application with sub steps", func() {
ns := corev1.Namespace{
ObjectMeta: metav1.ObjectMeta{

View File

@@ -192,7 +192,7 @@ var _ = Describe("Test Assemble Options", func() {
var _ = Describe("Test handleCheckManageWorkloadTrait func", func() {
It("Test every situation", func() {
traitDefs := map[string]v1beta1.TraitDefinition{
traitDefs := map[string]*v1beta1.TraitDefinition{
"rollout": {
Spec: v1beta1.TraitDefinitionSpec{
ManageWorkload: true,

View File

@@ -45,7 +45,7 @@ var _ = Describe("Test dispatch stage", func() {
appRev := v1beta1.ApplicationRevision{
Spec: v1beta1.ApplicationRevisionSpec{
ApplicationRevisionCompressibleFields: v1beta1.ApplicationRevisionCompressibleFields{
TraitDefinitions: map[string]v1beta1.TraitDefinition{
TraitDefinitions: map[string]*v1beta1.TraitDefinition{
"gateway": {
Spec: v1beta1.TraitDefinitionSpec{
Stage: v1beta1.PostDispatch,

View File

@@ -213,8 +213,8 @@ func (h *AppHandler) generateDispatcher(appRev *v1beta1.ApplicationRevision, rea
func getTraitDispatchStage(client client.Client, traitType string, appRev *v1beta1.ApplicationRevision) (StageType, error) {
trait, ok := appRev.Spec.TraitDefinitions[traitType]
if !ok {
trait = v1beta1.TraitDefinition{}
err := oamutil.GetCapabilityDefinition(context.Background(), client, &trait, traitType)
trait = &v1beta1.TraitDefinition{}
err := oamutil.GetCapabilityDefinition(context.Background(), client, trait, traitType)
if err != nil {
return DefaultDispatch, err
}

View File

@@ -222,15 +222,15 @@ var _ = Describe("Test Application workflow generator", func() {
Spec: oamcore.ApplicationRevisionSpec{
ApplicationRevisionCompressibleFields: oamcore.ApplicationRevisionCompressibleFields{
Application: *app.DeepCopy(),
ComponentDefinitions: make(map[string]oamcore.ComponentDefinition),
ComponentDefinitions: make(map[string]*oamcore.ComponentDefinition),
WorkloadDefinitions: make(map[string]oamcore.WorkloadDefinition),
TraitDefinitions: make(map[string]oamcore.TraitDefinition),
TraitDefinitions: make(map[string]*oamcore.TraitDefinition),
ScopeDefinitions: make(map[string]oamcore.ScopeDefinition),
},
},
}
apprev.Spec.ComponentDefinitions["worker"] = *cd
apprev.Spec.TraitDefinitions["rollout"] = *td
apprev.Spec.ComponentDefinitions["worker"] = cd.DeepCopy()
apprev.Spec.TraitDefinitions["rollout"] = td.DeepCopy()
Expect(k8sClient.Create(ctx, apprev)).Should(BeNil())
handler, err := NewAppHandler(ctx, reconciler, app, appParser)

View File

@@ -251,12 +251,12 @@ func (h *AppHandler) gatherRevisionSpec(af *appfile.Appfile) (*v1beta1.Applicati
Spec: v1beta1.ApplicationRevisionSpec{
ApplicationRevisionCompressibleFields: v1beta1.ApplicationRevisionCompressibleFields{
Application: *copiedApp,
ComponentDefinitions: make(map[string]v1beta1.ComponentDefinition),
ComponentDefinitions: make(map[string]*v1beta1.ComponentDefinition),
WorkloadDefinitions: make(map[string]v1beta1.WorkloadDefinition),
TraitDefinitions: make(map[string]v1beta1.TraitDefinition),
TraitDefinitions: make(map[string]*v1beta1.TraitDefinition),
ScopeDefinitions: make(map[string]v1beta1.ScopeDefinition),
PolicyDefinitions: make(map[string]v1beta1.PolicyDefinition),
WorkflowStepDefinitions: make(map[string]v1beta1.WorkflowStepDefinition),
WorkflowStepDefinitions: make(map[string]*v1beta1.WorkflowStepDefinition),
ScopeGVK: make(map[string]metav1.GroupVersionKind),
Policies: make(map[string]v1alpha1.Policy),
},
@@ -269,7 +269,7 @@ func (h *AppHandler) gatherRevisionSpec(af *appfile.Appfile) (*v1beta1.Applicati
if w.FullTemplate.ComponentDefinition != nil {
cd := w.FullTemplate.ComponentDefinition.DeepCopy()
cd.Status = v1beta1.ComponentDefinitionStatus{}
appRev.Spec.ComponentDefinitions[w.FullTemplate.ComponentDefinition.Name] = *cd
appRev.Spec.ComponentDefinitions[w.FullTemplate.ComponentDefinition.Name] = cd.DeepCopy()
}
if w.FullTemplate.WorkloadDefinition != nil {
wd := w.FullTemplate.WorkloadDefinition.DeepCopy()
@@ -283,7 +283,7 @@ func (h *AppHandler) gatherRevisionSpec(af *appfile.Appfile) (*v1beta1.Applicati
if t.FullTemplate.TraitDefinition != nil {
td := t.FullTemplate.TraitDefinition.DeepCopy()
td.Status = v1beta1.TraitDefinitionStatus{}
appRev.Spec.TraitDefinitions[t.FullTemplate.TraitDefinition.Name] = *td
appRev.Spec.TraitDefinitions[t.FullTemplate.TraitDefinition.Name] = td.DeepCopy()
}
}
for _, s := range w.ScopeDefinition {
@@ -307,13 +307,13 @@ func (h *AppHandler) gatherRevisionSpec(af *appfile.Appfile) (*v1beta1.Applicati
}
}
for name, def := range af.RelatedComponentDefinitions {
appRev.Spec.ComponentDefinitions[name] = *def
appRev.Spec.ComponentDefinitions[name] = def.DeepCopy()
}
for name, def := range af.RelatedTraitDefinitions {
appRev.Spec.TraitDefinitions[name] = *def
appRev.Spec.TraitDefinitions[name] = def.DeepCopy()
}
for name, def := range af.RelatedWorkflowStepDefinitions {
appRev.Spec.WorkflowStepDefinitions[name] = *def
appRev.Spec.WorkflowStepDefinitions[name] = def.DeepCopy()
}
for name, po := range af.ExternalPolicies {
appRev.Spec.Policies[name] = *po

View File

@@ -133,17 +133,17 @@ var _ = Describe("test generate revision ", func() {
},
Spec: v1beta1.ApplicationRevisionSpec{
ApplicationRevisionCompressibleFields: v1beta1.ApplicationRevisionCompressibleFields{
ComponentDefinitions: make(map[string]v1beta1.ComponentDefinition),
ComponentDefinitions: make(map[string]*v1beta1.ComponentDefinition),
WorkloadDefinitions: make(map[string]v1beta1.WorkloadDefinition),
TraitDefinitions: make(map[string]v1beta1.TraitDefinition),
TraitDefinitions: make(map[string]*v1beta1.TraitDefinition),
ScopeDefinitions: make(map[string]v1beta1.ScopeDefinition),
},
},
}
appRevision1.Spec.Application = app
appRevision1.Spec.ComponentDefinitions[cd.Name] = cd
appRevision1.Spec.ComponentDefinitions[cd.Name] = cd.DeepCopy()
appRevision1.Spec.WorkloadDefinitions[wd.Name] = wd
appRevision1.Spec.TraitDefinitions[rolloutTd.Name] = rolloutTd
appRevision1.Spec.TraitDefinitions[rolloutTd.Name] = rolloutTd.DeepCopy()
appRevision1.Spec.ScopeDefinitions[sd.Name] = sd
appRevision2 = *appRevision1.DeepCopy()
@@ -186,7 +186,7 @@ var _ = Describe("test generate revision ", func() {
// add an annotation to workload Definition
wd.SetAnnotations(map[string]string{oam.AnnotationAppRollout: "true"})
appRevision2.Spec.WorkloadDefinitions[wd.Name] = wd
appRevision2.Spec.ComponentDefinitions[cd.Name] = cd
appRevision2.Spec.ComponentDefinitions[cd.Name] = cd.DeepCopy()
verifyEqual()
})
@@ -201,7 +201,7 @@ var _ = Describe("test generate revision ", func() {
It("Test app revisions with different application spec should produce different hash and not equal", func() {
// add a component definition
appRevision1.Spec.ComponentDefinitions[webCompDef.Name] = webCompDef
appRevision1.Spec.ComponentDefinitions[webCompDef.Name] = webCompDef.DeepCopy()
verifyNotEqual()
})
@@ -1078,7 +1078,7 @@ status: {}
Expect(len(thisWSD) > 0 && func() bool {
expected := appfile.RelatedWorkflowStepDefinitions
for i, w := range thisWSD {
expW := *(expected[i])
expW := expected[i]
if !reflect.DeepEqual(w, expW) {
fmt.Printf("appfile wsd:%s apprev wsd%s", w.Name, expW.Name)
return false

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