From 62a81a17acda6fe7e39742d4f368231ec3beb559 Mon Sep 17 00:00:00 2001 From: ss75710541 <75710541@qq.com> Date: Wed, 27 Apr 2022 17:00:02 +0800 Subject: [PATCH] fix: repo.GetAppDetails().Helm.GetParameterValueByName not get helm.values --- expr/shared/appdetail.go | 4 +--- shared/argocd/service.go | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/expr/shared/appdetail.go b/expr/shared/appdetail.go index f5fd8fdb..451fb732 100644 --- a/expr/shared/appdetail.go +++ b/expr/shared/appdetail.go @@ -1,8 +1,6 @@ package shared -import ( - "github.com/argoproj/argo-cd/v2/reposerver/apiclient" -) +import "github.com/argoproj/argo-cd/v2/reposerver/apiclient" type AppDetail struct { // AppDetail Type diff --git a/shared/argocd/service.go b/shared/argocd/service.go index 457614a7..6ba4d7f4 100644 --- a/shared/argocd/service.go +++ b/shared/argocd/service.go @@ -123,6 +123,9 @@ func (svc *argoCDService) GetAppDetails(ctx context.Context, appSource *v1alpha1 var has *shared.HelmAppSpec if appDetail.Helm != nil { paramsMap := map[string]*v1alpha1.HelmParameter{} + for _, param := range appDetail.Helm.Parameters { + paramsMap[param.Name] = param + } if appSource.Helm.Parameters != nil { for _, overrideParam := range appSource.Helm.Parameters { paramsMap[overrideParam.Name] = &v1alpha1.HelmParameter{ @@ -133,9 +136,6 @@ func (svc *argoCDService) GetAppDetails(ctx context.Context, appSource *v1alpha1 } } if appSource.Helm.Values != "" { - for _, param := range appDetail.Helm.Parameters { - paramsMap[param.Name] = param - } valuesParams, err := GetHelmParametersByValues(appSource.Helm.Values) if err != nil { return nil, err