warnings are printed when chart is deprecated. unsure of proper testing

pull/3762/head
Ryan Hartje 8 years ago
parent 94a5f3a1eb
commit 6f1763464a

@ -296,6 +296,11 @@ func (i *installCmd) run() error {
return prettyError(err)
}
PrintStatus(i.out, status)
if chartRequested.Metadata.Deprecated {
fmt.Printf("WARNING: This chart has been deprecated.\n")
}
return nil
}

@ -200,8 +200,14 @@ func (u *upgradeCmd) run() error {
return err
}
// Setup warning since ch is out of scope after the if below
warning := ""
// Check chart requirements to make sure all dependencies are present in /charts
if ch, err := chartutil.Load(chartPath); err == nil {
if ch.Metadata.Deprecated {
warning = "WARNING: This chart has been deprecated.\n"
}
if req, err := chartutil.LoadRequirements(ch); err == nil {
if err := checkDependencies(ch, req); err != nil {
return err
@ -242,5 +248,9 @@ func (u *upgradeCmd) run() error {
}
PrintStatus(u.out, status)
if len(warning) != 0 {
fmt.Fprintf(u.out, warning)
}
return nil
}

Loading…
Cancel
Save