Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: custom deploy addon support cluster addon and can select version #6446

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

CeerDecy
Copy link
Member

What this PR does / why we need it:

feat custom deploy addon support cluster addon and can select version

Which issue(s) this PR fixes:

Specified Reviewers:

/assign @iutx

ChangeLog

Language Changelog
🇺🇸 English feat custom deploy addon support cluster addon and can select version
🇨🇳 中文 自定义部署Addon支持集群级别Addon并且支持版本选择

Need cherry-pick to release versions?

Add comment like /cherry-pick release/1.0 when this PR is merged.

For details on the cherry pick process, see the cherry pick requests section under CONTRIBUTING.md.

Copy link

codecov bot commented Sep 29, 2024

Codecov Report

Attention: Patch coverage is 43.85965% with 64 lines in your changes missing coverage. Please review.

Project coverage is 15.15%. Comparing base (9aaa584) to head (2cef038).

Files with missing lines Patch % Lines
...nternal/tools/orchestrator/services/addon/addon.go 0.00% 44 Missing ⚠️
...tools/orchestrator/services/addon/addon_handler.go 54.54% 20 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6446      +/-   ##
==========================================
+ Coverage   15.14%   15.15%   +0.01%     
==========================================
  Files        3674     3674              
  Lines      376844   376917      +73     
==========================================
+ Hits        57076    57138      +62     
- Misses     314307   314319      +12     
+ Partials     5461     5460       -1     
Flag Coverage Δ
by-github-actions 15.15% <43.85%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
internal/tools/orchestrator/endpoints/addon.go 6.73% <100.00%> (+3.70%) ⬆️
internal/tools/orchestrator/endpoints/endpoints.go 6.53% <100.00%> (+6.53%) ⬆️
...duler/executor/plugins/k8s/instanceinfosync/pod.go 0.00% <ø> (ø)
...tools/orchestrator/services/addon/addon_handler.go 31.79% <54.54%> (-0.16%) ⬇️
...nternal/tools/orchestrator/services/addon/addon.go 13.50% <0.00%> (-0.15%) ⬇️

... and 4 files with indirect coverage changes

Copy link
Member

@iutx iutx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -2686,7 +2705,7 @@ func (a *Addon) ListCustomAddon() (*[]map[string]interface{}, error) {
addonMap["addonName"] = item.Name
addonMap["vars"] = addonSpec.ConfigVars
switch item.Name {
case "mysql", "api-gateway", "monitor":
case "mysql", "api-gateway", "monitor", apistructs.AddonRegisterCenter, apistructs.AddonNewConfigCenter:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to replace all of them with constants?


if hasRegister && !hasConfig {
addonCreateReq.Addons["config-center"] = &diceyml.AddOn{
Plan: fmt.Sprintf("%s:%s", apistructs.AddonNewConfigCenter, "basic"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use constant basic from structs.

@CeerDecy CeerDecy requested a review from iutx October 24, 2024 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants