From a3305aa2140ef49d8ca84188e861ac4ce89f4da2 Mon Sep 17 00:00:00 2001 From: ss75710541 <75710541@qq.com> Date: Wed, 27 Apr 2022 14:26:58 +0800 Subject: [PATCH] fix: repo.GetAppDetails().Helm.GetParameterValueByName not get helm.values --- shared/argocd/service.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/shared/argocd/service.go b/shared/argocd/service.go index e634dcf3..7677dcd8 100644 --- a/shared/argocd/service.go +++ b/shared/argocd/service.go @@ -123,17 +123,13 @@ func (svc *argoCDService) GetAppDetails(ctx context.Context, appSource *v1alpha1 return nil, err } - fmt.Sprintf("----- appSource.Helm.Marshal data: %v", data) + fmt.Sprintf("----- appSource: %v", appSource) appDetail.Helm.Unmarshal(data) - fmt.Sprintf("----- appDetail.Helm data: %v", appDetail.Helm) - + fmt.Sprintf("----- appDetail: %v", appDetail) + var has *shared.HelmAppSpec if appDetail.Helm != nil { - - fmt.Sprintf(" ------- appSource.Helm.Parameters: %v\n", appSource.Helm.Parameters) - fmt.Sprintf(" ------- appDetail.Helm.Parameters: %v\n", appDetail.Helm.Parameters) - if appSource.Helm.Parameters != nil { for _, overrideParam := range appSource.Helm.Parameters { for _, defaultParam := range appDetail.Helm.Parameters { @@ -172,12 +168,11 @@ func (svc *argoCDService) GetAppDetails(ctx context.Context, appSource *v1alpha1 // fmt.Printf("-------appSource.Helm.Parameters: %v\n", appSource.Helm.Parameters) // fmt.Printf("-------appDetail.Helm.Parameters: %v\n", appDetail.Helm.Parameters) //} - has = &shared.HelmAppSpec{ Name: appDetail.Helm.Name, ValueFiles: appDetail.Helm.ValueFiles, Parameters: appDetail.Helm.Parameters, - Values: appSource.Helm.Values, + Values: appDetail.Helm.Values, FileParameters: appDetail.Helm.FileParameters, } }