Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
fix: repo.GetAppDetails().Helm.GetParameterValueByName not get helm.v…
Browse files Browse the repository at this point in the history
…alues
  • Loading branch information
ss75710541 committed Apr 27, 2022
1 parent ebecda7 commit 62a81a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions expr/shared/appdetail.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions shared/argocd/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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
Expand Down

0 comments on commit 62a81a1

Please sign in to comment.