Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
fix: GetParameterValueByName gets the default value changed to the ov…
Browse files Browse the repository at this point in the history
…erride value
  • Loading branch information
ss75710541 committed Mar 15, 2022
1 parent 059c1b6 commit 8dddaa3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions shared/argocd/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,21 @@ func (svc *argoCDService) GetAppDetails(ctx context.Context, appSource *v1alpha1
if err != nil {
return nil, err
}

var has *shared.HelmAppSpec
if appDetail.Helm != nil {

if appSource.Helm.Parameters != nil {
for _, overrideParam := range appSource.Helm.Parameters {
for _, defaultParam := range appDetail.Helm.Parameters {
if overrideParam.Name == defaultParam.Name {
defaultParam.Value = overrideParam.Value
defaultParam.ForceString = overrideParam.ForceString
}
}
}
}

has = &shared.HelmAppSpec{
Name: appDetail.Helm.Name,
ValueFiles: appDetail.Helm.ValueFiles,
Expand Down

0 comments on commit 8dddaa3

Please sign in to comment.