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

Commit 8dddaa3

Browse files
committed
fix: GetParameterValueByName gets the default value changed to the override value
1 parent 059c1b6 commit 8dddaa3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

shared/argocd/service.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,21 @@ func (svc *argoCDService) GetAppDetails(ctx context.Context, appSource *v1alpha1
117117
if err != nil {
118118
return nil, err
119119
}
120+
120121
var has *shared.HelmAppSpec
121122
if appDetail.Helm != nil {
123+
124+
if appSource.Helm.Parameters != nil {
125+
for _, overrideParam := range appSource.Helm.Parameters {
126+
for _, defaultParam := range appDetail.Helm.Parameters {
127+
if overrideParam.Name == defaultParam.Name {
128+
defaultParam.Value = overrideParam.Value
129+
defaultParam.ForceString = overrideParam.ForceString
130+
}
131+
}
132+
}
133+
}
134+
122135
has = &shared.HelmAppSpec{
123136
Name: appDetail.Helm.Name,
124137
ValueFiles: appDetail.Helm.ValueFiles,

0 commit comments

Comments
 (0)