Skip to content

Commit

Permalink
fix: wrong inject registercenter version key
Browse files Browse the repository at this point in the history
  • Loading branch information
CeerDecy committed Nov 28, 2024
1 parent 9aaa584 commit deba5bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/tools/orchestrator/services/addon/addon.go
Original file line number Diff line number Diff line change
Expand Up @@ -3889,7 +3889,7 @@ func (a *Addon) injectVersion(addon *apistructs.AddonCreateItem) error {
if addon.Options == nil {
addon.Options = make(map[string]string)
}
if v, ok := addon.Options["Version"]; ok && v != "" {
if v, ok := addon.Options["version"]; ok && v != "" {
return nil
}

Expand All @@ -3906,6 +3906,6 @@ func (a *Addon) injectVersion(addon *apistructs.AddonCreateItem) error {
return fmt.Errorf("there are no default addons [%s]", addon.Type)
}

addon.Options["Version"] = defaultAddon.Version
addon.Options["version"] = defaultAddon.Version
return nil
}

0 comments on commit deba5bf

Please sign in to comment.