diff --git a/cmd/helm/install.go b/cmd/helm/install.go index 55e34f405..8657e3e8a 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -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 } diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index 125796762..d9ad3e5f2 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -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 }