From 6387ed836bd3b169e274694b5e1e0decb726cef5 Mon Sep 17 00:00:00 2001 From: ss75710541 <75710541@qq.com> Date: Tue, 26 Apr 2022 19:07:42 +0800 Subject: [PATCH] fix: repo.GetAppDetails().Helm.GetParameterValueByName not get helm.values --- shared/argocd/service.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shared/argocd/service.go b/shared/argocd/service.go index a75b6b35..58ad6213 100644 --- a/shared/argocd/service.go +++ b/shared/argocd/service.go @@ -140,7 +140,8 @@ func (svc *argoCDService) GetAppDetails(ctx context.Context, appSource *v1alpha1 } flatVals(valuesMap, output) - for i := range has.Parameters { + fmt.Printf("-------flatVals output: %v", output) + for i := range appDetail.Helm.Parameters { if v, ok := output[has.Parameters[i].Name]; ok { has.Parameters[i].Value = v delete(output, has.Parameters[i].Name) @@ -148,9 +149,13 @@ func (svc *argoCDService) GetAppDetails(ctx context.Context, appSource *v1alpha1 } } + fmt.Printf("-------after delete output: %v", output) + for k, v := range output { appDetail.Helm.Parameters = append(appDetail.Helm.Parameters, &v1alpha1.HelmParameter{Name: k, Value: v}) } + + fmt.Printf("-------appDetail.Helm.Parameters: %v", appDetail.Helm.Parameters) } has = &shared.HelmAppSpec{