Commit Graph

1825 Commits

Author SHA1 Message Date
suwliang3 c0cbe24dc4
Feat: optimize "application-resource-tree-view" (#6096)
* feature: Optimize "application-resource-tree-view"

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

* fix: go fmt

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

* fix: modif staticcheck

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

---------

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>
2023-06-09 09:44:36 +08:00
Somefive c255d21ad6
Chore: remove unnecessary go mod (#6093)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-06-08 15:32:57 +08:00
merusso be3b990df0
Feat(#5861): Support addon dependencies version ranges (#6002)
* Feat(#5861): Support addon dependencies version ranges

This change enables addon maintainers to define version ranges for
dependencies in an addon's metadata.yaml file.

This behavior is similar to the version range allowed in the `system`
section of the metadata file. The version range expression for
`dependencies` follows the same format as for `system`.

Example:

```yaml
dependencies:
  - name: addon1
    version: ">= 2.3.3, < 3.0.0"
  - name: addon2
    version: ">= 0.1.0, < 1.0.0"
```

When installing an addon, the behavior varies depending on whether the
dependency is already installed.

If a dependency is already installed, the installed version will be
validated against the version range, and installation will fail with an
error if there's a mismatch.
If a dependency is not installed, the version range will be used to
select the addon version to be installed. If no addon version matching
the range exists, the installation will fail with an error.

Fixes #5861

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): remove unused ctx parameter

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): Add comment for IsLocalRegistry

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): unexport AddonInfoMap

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): unexport addonInfo

Signed-off-by: Michael Russo <merusso@gmail.com>

* chore: replace map[string]addonInfo with addonInfoMap for consistency

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix: add short circuit when dependency version is not specified

Signed-off-by: Michael Russo <merusso@gmail.com>

* feat: Add test for multiple validation errors

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix: Run go mod tidy

Signed-off-by: Michael Russo <merusso@gmail.com>

* feat: add tests for ToVersionedRegistry

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix: simplify listInstalledAddons loop

Signed-off-by: Michael Russo <merusso@gmail.com>

* feat: listAvailableAddons returns addons from multiple sources

Changes:
* implement ListAddonInfo in Registry
* add interface to aid testing of listAvailableAddons
* add tests for listAvailableAddons

Signed-off-by: Michael Russo <merusso@gmail.com>

* refactor: simplify validateAddonDependencies

move logic from validateAddonDependencies to
calculateDependencyVersionToInstall.

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): Implicit memory aliasing in for loop.

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): non-wrapping format verb for fmt.Errorf

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): indent-error-flow: (revive)

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): unexported-return

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): exported type comment format (revive)

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): refactor AddonInfo to ItemInfo, avoid "stutter" (revive)

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): add comment to exported method Registry.ListAddonInfo

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): fix stutter, rename AddonInfoLister to ItemInfoLister

Signed-off-by: Michael Russo <merusso@gmail.com>

* chore: Add suite tests for Registry.ListAddonInfo()

Signed-off-by: Michael Russo <merusso@gmail.com>

* Test: add test cases for addon.sortVersionsDescending

Signed-off-by: Michael Russo <merusso@gmail.com>

---------

Signed-off-by: Michael Russo <merusso@gmail.com>
2023-06-07 11:44:54 +08:00
Yang Gang 30bc8c95f7
Chore: Cache the DiscoveryClient for cli command. (#6091)
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-06-07 09:58:46 +08:00
Somefive 8e6bed2340
Fix: application gc not blocked by apprev gc (#6074)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-06-05 11:04:23 +08:00
Somefive f15eba2c5f
Chore: remove legacy rollout and scope (#6068)
* Chore: remove legacy rollout & scope

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

* remove outdated params

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

* fix

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-06-05 10:57:38 +08:00
Somefive 1a6dafafde
Feat: support custom cascading gc policy (#6059) 2023-06-01 10:12:10 +08:00
Somefive dd899c2b39
Chore: remove outdated apis(v1alppha2 ApplicationConfiguration Component, and HealthScope, Rollout) (#6041)
* remove outdated api

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

* fix rt test: no component rt

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

* recover context.revision to component hash

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-06-01 09:32:49 +08:00
yyzxw d6788f12dd
feature: parallel init cluster info (#6060)
Signed-off-by: yyzxw <1020938856@qq.com>
2023-05-31 19:31:08 +08:00
Somefive 04cd510ddc
Chore: use package function to replace parallel function (#6052) 2023-05-31 14:01:30 +08:00
Somefive ff881f930c
Fix: ignore kind not match err for vela def (#6053)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-30 17:03:41 +08:00
Somefive 268400e163
Feat: support applicator applying resources and update status (#6030)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-29 17:57:34 +08:00
dependabot[bot] a1f57e4a90
Chore: (deps): Bump github.com/openkruise/rollouts (#6047)
Bumps [github.com/openkruise/rollouts](https://github.com/openkruise/rollouts) from 0.1.1-0.20220622054609-149e5a48da5e to 0.3.0.
- [Release notes](https://github.com/openkruise/rollouts/releases)
- [Changelog](https://github.com/openkruise/rollouts/blob/master/CHANGELOG.md)
- [Commits](https://github.com/openkruise/rollouts/commits/v0.3.0)



---
updated-dependencies:
- dependency-name: github.com/openkruise/rollouts
  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-05-29 17:53:17 +08:00
yyzxw 99ad780261
chore: add controller ut (#6043)
Signed-off-by: yyzxw <1020938856@qq.com>
2023-05-29 11:55:06 +08:00
Ahmed Qashlan a849435db2
Feat(velaql): read max depth for query iterator from env. (#6039)
* Feat(velaql): read max depth for query iterator from env

Signed-off-by: Ahmed Qashlan <ahmedelqashlan@gmail.com>

* Feat(velaql): read max depth for query iterator from env.

Ref #6014

Signed-off-by: Ahmed Qashlan <ahmedelqashlan@gmail.com>

---------

Signed-off-by: Ahmed Qashlan <ahmedelqashlan@gmail.com>
2023-05-29 10:49:46 +08:00
Somefive 2298dd73dc
Feat: revert ci to kind (#6035)
* Feat: revert ci to kind

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

* feat: use internal runner

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

* fix test bug

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-25 17:49:44 +08:00
Somefive ef4bb07fb3
Chore: remove dm (#6036)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-25 13:54:35 +08:00
Somefive 4d81ba8909
Feat: support force resource location with dispatch (#6033)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-25 10:18:50 +08:00
Somefive 0df7803022
Feat: add validation for invalid definition attribute (#6029)
* Feat: add validation for invalid definition attribute

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

* fix flaky test

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-24 16:40:42 +08:00
Somefive e109d4e525
Chore: upgrade kubebuilder installation in unit-test ci (#6018)
* Chore: upgrade kubebuilder installation in unit-test ci

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

* upgrade ingress in kuebuilder test

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-23 14:46:22 +08:00
yyzxw 3cb0f7b330
refactor: parse trait & scope (#6017)
Signed-off-by: yyzxw <1020938856@qq.com>
2023-05-22 19:21:01 +08:00
yyzxw dc52498b1d
refactor: enhanced code readability (#6012)
Signed-off-by: yyzxw <1020938856@qq.com>
2023-05-21 15:19:06 +08:00
Dhanu Saputra 208a4aed2d
Feat: application_controller should be responsible for deleting application revision (#5739)
* [Feature] application_controller should be responsible for deleting application revision

Signed-off-by: dhanu <andreasdhanu@gmail.com>

* test

Signed-off-by: dhanu <andreasdhanu@gmail.com>

* delete-app-revision: fix reviews, add tests

Signed-off-by: dhanu <andreasdhanu@gmail.com>

* delete-app-revision: rebase master

Signed-off-by: dhanu <andreasdhanu@gmail.com>

* delete-app-revision: make func private

Signed-off-by: dhanu <andreasdhanu@gmail.com>

* delete-app-revision clean

Signed-off-by: dhanu <andreasdhanu@gmail.com>

* delete-app-revision: fix staticcheck

Signed-off-by: dhanu <andreasdhanu@gmail.com>

* delete-app-revision: fix review

Signed-off-by: dhanu <andreasdhanu@gmail.com>

---------

Signed-off-by: dhanu <andreasdhanu@gmail.com>
2023-05-17 17:41:01 +08:00
Somefive 530d7c5bd6
Feat: support resource update policy (#6003) 2023-05-17 16:11:06 +08:00
zhaohuiweixiao eaa7f5821e
Fix: list addon commond displays only the first 20 entries when addon registry is gitlab type (#5999)
* Fix: list addon commond displays only the first 20 entries when addon registry is gitlab type

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

* Fix: add tips for registry addon command

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

* Fix: modify the addon registry command tip

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

---------

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
2023-05-17 15:32:14 +08:00
Somefive da8588c887
Feat: support customizing application revision limit number in policy (#5995)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-16 16:12:37 +08:00
yyzxw 1af82cd282
cleanup: remove unused code and fix typo (#5986)
Signed-off-by: yyzxw <1020938856@qq.com>
Signed-off-by: xiaowu.zhu <xiaowu.zhu@daocloud.io>
Co-authored-by: xiaowu.zhu <xiaowu.zhu@daocloud.io>
2023-05-16 12:37:00 +08:00
Somefive d59b116d06
Feat: upgrade ginkgo to v2 (#5940)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-15 16:07:51 +08:00
yyzxw f6a9d6675d
test: add ut (#5985)
Signed-off-by: yyzxw <1020938856@qq.com>
2023-05-15 09:50:50 +08:00
Xinwei Xiong 68743841cd
Chore: Give the help information of Makefile to make it more clear (#5638)
* chore(Makefile): Give the help information of Makefile to make it more readable

Signed-off-by: Xinwei Xiong <3293172751nss@gmail.com>

fix: Fixed some spelling mistakes

Signed-off-by: Xinwei Xiong <3293172751nss@gmail.com>

fix: part of the makefile shows a problem

Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>

* fix: makefile targer image-cleanup

Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>

---------

Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
2023-05-09 18:55:25 +08:00
suwliang3 c06c5dd9fd
Fix: The addon page displays the deleted addon (#5924)
Co-authored-by: qiaozp <47812250+chivalryq@users.noreply.github.com>
2023-05-08 14:10:12 +08:00
zhaohuiweixiao 91e31c1673
Fix: restrict the rules that automatically add topology strategy to addons to be valid only for the yaml type (#5957)
Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
2023-05-06 21:47:19 +12:00
Somefive e828d3c8cf
Feat: allow empty policy name (#5917) 2023-05-04 16:48:43 +08:00
qiaozp 5cb942c444
Fix: trait not added in Go SDK (#5950)
Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-05-04 10:20:52 +08:00
zhaohuiweixiao 98deab08f5
Fix: install dependency is invalid for runtime addon when it's cluster arg is nil (#5865)
* Fix: install dependency is invalid for runtime addon when it's clusters arg is nil

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

* Fix: add unit test for getDependencyArgs and checkDependencyNeedInstall

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

* Fix: Simplified the checkDependencyNeedInstall func logic

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

* Fix: add comments for checkDependencyNeedInstall

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

---------

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
2023-04-28 10:16:33 +08:00
dependabot[bot] 479221f49f
Chore: (deps): Bump sigs.k8s.io/gateway-api from 0.4.3 to 0.6.2 (#5829)
* Chore: (deps): Bump sigs.k8s.io/gateway-api from 0.4.3 to 0.6.2

Bumps [sigs.k8s.io/gateway-api](https://github.com/kubernetes-sigs/gateway-api) from 0.4.3 to 0.6.2.
- [Release notes](https://github.com/kubernetes-sigs/gateway-api/releases)
- [Changelog](https://github.com/kubernetes-sigs/gateway-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kubernetes-sigs/gateway-api/compare/v0.4.3...v0.6.2)

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

---
updated-dependencies:
- dependency-name: sigs.k8s.io/gateway-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* fix gateway related api

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2023-04-26 10:48:17 +08:00
Somefive bfb673e0c9
Feat: support multi policies (#5811)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-24 17:02:32 +08:00
caiqi1111 b4e499ba37
Fix: support get helm chart values from which index.yaml urls is not … (#5786)
* Fix: support get helm chart values from which index.yaml urls is not completed

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

* Fix: support get helm chart values from which index.yaml urls is not completed

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

* Fix: support get helm chart values from which index.yaml urls is uncomplted

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

* Fix: support get helm chart values from which index.yaml urls is uncompleted

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

---------

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>
2023-04-24 10:30:30 +08:00
Somefive 0174e9aa1f
Fix: multi cluster inline policy load extra definitions (#5901)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-24 10:19:25 +08:00
Somefive f328308d8e
Feat: remove unused crd in chart (#5899)
* Feat: remove unused crd in chart

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

* fix test

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-24 09:57:30 +08:00
JohnJan efb2f1b083
Fix: parse template disable resolve provider functions (#5905)
Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-04-24 09:57:16 +08:00
Somefive 1aaab58f15
Feat: upgrade deps (#5900)
* Chore: cherry-pick #5821 #5822

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

* Chore: upgrade cluster gateway

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

* Chore: fix config test

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-23 17:50:37 +08:00
JohnJan 5549619ef9
Feat: support validate properties with CueX (#5894)
Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-04-21 10:05:40 +08:00
Somefive 106b7b3670
Feat: support mark stage in gc when workflow failed (#5882)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-20 14:05:45 +08:00
JohnJan 3d9b1b68af
Feat: support parse template depends on CueX (#5848)
* Feat: support parse template depends on CueX

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

* Feat: support parse template depends on CueX

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

---------

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-04-19 17:40:56 +08:00
Somefive feb819920e
Feat: support connecting cluster via proxy url (#5875)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-19 11:12:02 +08:00
Tianxin Dong 657fcc6c64
Fix: fix terminate suspending steps (#5872)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-18 16:57:30 +08:00
wyike 2821682c60
fix bug if addon parameter is Empty (#5856)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-04-14 17:45:09 +08:00
Jianbo Sun 863da991bc
Feat: add new fields for addon metadata (#5845)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-04-14 17:16:38 +08:00
Tianxin Dong fea7ae5935
Fix: fix the operate order in suspend & resume (#5841)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-13 11:29:22 +08:00