Store config data in maps directly

pull/2160/head
tamal 9 years ago
parent b23db775aa
commit bfb0772e85

@ -22,7 +22,7 @@ type ReleaseSpec struct {
ChartMetadata *hapi_chart.Metadata `json:"chartMetadata,omitempty"` ChartMetadata *hapi_chart.Metadata `json:"chartMetadata,omitempty"`
// Config is the set of extra Values added to the chart. // Config is the set of extra Values added to the chart.
// These values override the default values inside of the chart. // These values override the default values inside of the chart.
Config *hapi_chart.Config `json:"config,omitempty"` Config map[string]string `json:"config,omitempty"`
// Version is an int32 which represents the version of the release. // Version is an int32 which represents the version of the release.
Version int32 `json:"version,omitempty"` Version int32 `json:"version,omitempty"`

@ -395,7 +395,7 @@ func newReleasesObject(key string, rls *rspb.Release, lbs labels) (*rapi.Release
Labels: lbs.toMap(), Labels: lbs.toMap(),
}, },
Spec: rapi.ReleaseSpec{ Spec: rapi.ReleaseSpec{
Config: rls.Config, Config: map[string]string{},
Version: rls.Version, Version: rls.Version,
Data: s, Data: s,
}, },
@ -416,6 +416,11 @@ func newReleasesObject(key string, rls *rspb.Release, lbs labels) (*rapi.Release
if rls.Chart != nil { if rls.Chart != nil {
r.Spec.ChartMetadata = rls.Chart.Metadata r.Spec.ChartMetadata = rls.Chart.Metadata
} }
if rls.Config != nil {
for k, v := range rls.Config.Values {
r.Spec.Config[k] = v.Value
}
}
return r, nil return r, nil
} }

Loading…
Cancel
Save