Skip to content

Commit

Permalink
Fix helm when all configs are objects (#810)
Browse files Browse the repository at this point in the history
Co-authored-by: hanpengfei01 <hanpengfei01@baidu.com>
  • Loading branch information
hannatao and hanpengfei01 committed Nov 29, 2023
1 parent e408f86 commit 9a1f685
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ami/kube/kube_helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,15 @@ func setChartValues(app specv1.Application, cfgs map[string]specv1.Configuration
source2 := app.Volumes[1].VolumeSource
if source1.HostPath != nil {
dir = source1.HostPath.Path + "/" + svc.Image
if source2.Config == nil {
return "", nil, errors.Trace(errors.New("no value has been selected"))
}
valueConfig = source2.Config.Name
} else if source2.HostPath != nil {
dir = source2.HostPath.Path + "/" + svc.Image
if source1.Config == nil {
return "", nil, errors.Trace(errors.New("no value has been selected"))
}
valueConfig = source1.Config.Name
} else {
return "", nil, errors.Trace(errors.New("no value has been selected"))
Expand Down

0 comments on commit 9a1f685

Please sign in to comment.