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

Commit 4bc7268

Browse files
committed
fix: repo.GetAppDetails().Helm.GetParameterValueByName not get helm.values
1 parent b10d307 commit 4bc7268

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

shared/argocd/service.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,15 @@ func (svc *argoCDService) GetAppDetails(ctx context.Context, appSource *v1alpha1
134134

135135
if appSource.Helm.Values != "" {
136136

137-
fmt.Printf("-------start output")
137+
fmt.Printf("-------start output\n")
138138
output := map[string]string{}
139139
valuesMap := make(map[interface{}]interface{})
140140
if err := yaml.Unmarshal([]byte(appSource.Helm.Values), valuesMap); err != nil {
141141
return nil, fmt.Errorf("failed to parse : %s, appSource.Helm.Values: %v", err, appSource.Helm.Values)
142142
}
143143
flatVals(valuesMap, output)
144144

145-
fmt.Printf("-------flatVals output")
145+
fmt.Printf("-------flatVals output\n")
146146
//for i := range appDetail.Helm.Parameters {
147147
// if v, ok := output[has.Parameters[i].Name]; ok {
148148
// has.Parameters[i].Value = v
@@ -151,15 +151,16 @@ func (svc *argoCDService) GetAppDetails(ctx context.Context, appSource *v1alpha1
151151
// }
152152
//}
153153

154-
fmt.Printf("-------after delete output: %v", output)
154+
fmt.Printf("-------after delete output: %v\n", output)
155155
for i := range appDetail.Helm.Parameters {
156156
if v, ok := output[appDetail.Helm.Parameters[i].Name]; ok {
157157
parameter := &v1alpha1.HelmParameter{Name: appDetail.Helm.Parameters[i].Name, Value: v}
158158
appDetail.Helm.Parameters[i] = parameter
159159
}
160160
}
161161

162-
fmt.Printf("-------appDetail.Helm.FileParameters: %v", appDetail.Helm.FileParameters)
162+
fmt.Printf("-------appDetail.Helm.FileParameters: %v\n", appDetail.Helm.FileParameters)
163+
fmt.Printf("-------appDetail.Helm.Parameters: %v\n", appDetail.Helm.Parameters)
163164
}
164165

165166
has = &shared.HelmAppSpec{

0 commit comments

Comments
 (0)