From 8dddaa3ec2d963bc821c66c080db4a2ed208b58c Mon Sep 17 00:00:00 2001 From: ss75710541 <75710541@qq.com> Date: Tue, 15 Mar 2022 12:04:54 +0800 Subject: [PATCH] fix: GetParameterValueByName gets the default value changed to the override value --- shared/argocd/service.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/shared/argocd/service.go b/shared/argocd/service.go index cbc1c670..349fe975 100644 --- a/shared/argocd/service.go +++ b/shared/argocd/service.go @@ -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,