Make GetCapabilities() method public

Signed-off-by: Tamal Saha <tamal@appscode.com>
pull/7698/head
Tamal Saha 6 years ago
parent 53b6580bad
commit e178388895

@ -95,7 +95,7 @@ type RESTClientGetter interface {
type DebugLog func(format string, v ...interface{}) type DebugLog func(format string, v ...interface{})
// capabilities builds a Capabilities from discovery information. // capabilities builds a Capabilities from discovery information.
func (c *Configuration) getCapabilities() (*chartutil.Capabilities, error) { func (c *Configuration) GetCapabilities() (*chartutil.Capabilities, error) {
if c.Capabilities != nil { if c.Capabilities != nil {
return c.Capabilities, nil return c.Capabilities, nil
} }

@ -209,7 +209,7 @@ func (i *Install) Run(chrt *chart.Chart, vals map[string]interface{}) (*release.
// the user doesn't have to specify both // the user doesn't have to specify both
i.Wait = i.Wait || i.Atomic i.Wait = i.Wait || i.Atomic
caps, err := i.cfg.getCapabilities() caps, err := i.cfg.GetCapabilities()
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -465,7 +465,7 @@ func (c *Configuration) renderResources(ch *chart.Chart, values chartutil.Values
hs := []*release.Hook{} hs := []*release.Hook{}
b := bytes.NewBuffer(nil) b := bytes.NewBuffer(nil)
caps, err := c.getCapabilities() caps, err := c.GetCapabilities()
if err != nil { if err != nil {
return hs, b, "", err return hs, b, "", err
} }

@ -169,7 +169,7 @@ func joinErrors(errs []error) string {
// deleteRelease deletes the release and returns manifests that were kept in the deletion process // deleteRelease deletes the release and returns manifests that were kept in the deletion process
func (u *Uninstall) deleteRelease(rel *release.Release) (string, []error) { func (u *Uninstall) deleteRelease(rel *release.Release) (string, []error) {
caps, err := u.cfg.getCapabilities() caps, err := u.cfg.GetCapabilities()
if err != nil { if err != nil {
return rel.Manifest, []error{errors.Wrap(err, "could not get apiVersions from Kubernetes")} return rel.Manifest, []error{errors.Wrap(err, "could not get apiVersions from Kubernetes")}
} }

@ -155,7 +155,7 @@ func (u *Upgrade) prepareUpgrade(name string, chart *chart.Chart, vals map[strin
IsUpgrade: true, IsUpgrade: true,
} }
caps, err := u.cfg.getCapabilities() caps, err := u.cfg.GetCapabilities()
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }

Loading…
Cancel
Save