Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

Commit 9b00bc2

Browse files
committed
fix: repo.GetAppDetails().Helm.GetParameterValueByName not get helm.values
1 parent 7d4d53d commit 9b00bc2

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

expr/shared/appdetail.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
package shared
22

3-
import "github.com/argoproj/argo-cd/v2/reposerver/apiclient"
3+
import (
4+
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
5+
"github.com/argoproj/argo-cd/v2/reposerver/apiclient"
6+
)
47

58
type AppDetail struct {
69
// AppDetail Type
710
Type string
811
// Ksonnet details
912
Ksonnet *apiclient.KsonnetAppSpec
1013
// Helm details
11-
Helm *apiclient.HelmAppSpec
14+
Helm *v1alpha1.ApplicationSourceHelm
1215
// Kustomize details
1316
Kustomize *apiclient.KustomizeAppSpec
1417
// Directory details

expr/shared/helmappspec.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
package shared
22

33
import (
4-
"github.com/argoproj/argo-cd/v2/reposerver/apiclient"
4+
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
55
)
66

77
type HelmAppSpec struct {
8-
HAS *apiclient.HelmAppSpec
8+
ASH *v1alpha1.ApplicationSourceHelm
99
}
1010

1111
func (has HelmAppSpec) GetParameterValueByName(Name string) string {
1212
var value string
13-
for i := range has.HAS.Parameters {
14-
if has.HAS.Parameters[i].Name == Name {
15-
value = has.HAS.Parameters[i].Value
13+
for i := range has.ASH.Parameters {
14+
if has.ASH.Parameters[i].Name == Name {
15+
value = has.ASH.Parameters[i].Value
1616
break
1717
}
1818
}
@@ -21,9 +21,9 @@ func (has HelmAppSpec) GetParameterValueByName(Name string) string {
2121

2222
func (has HelmAppSpec) GetFileParameterPathByName(Name string) string {
2323
var path string
24-
for i := range has.HAS.FileParameters {
25-
if has.HAS.FileParameters[i].Name == Name {
26-
path = has.HAS.FileParameters[i].Path
24+
for i := range has.ASH.FileParameters {
25+
if has.ASH.FileParameters[i].Name == Name {
26+
path = has.ASH.FileParameters[i].Path
2727
break
2828
}
2929
}

shared/argocd/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func (svc *argoCDService) GetAppDetails(ctx context.Context, appSource *v1alpha1
172172
//}
173173
return &shared.AppDetail{
174174
Type: appDetail.Type,
175-
Helm: appDetail.Helm,
175+
Helm: appSource.Helm,
176176
Ksonnet: appDetail.Ksonnet,
177177
Kustomize: appDetail.Kustomize,
178178
Directory: appDetail.Directory,

0 commit comments

Comments
 (0)