diff --git a/cmd/helm/install.go b/cmd/helm/install.go index ae50684e8..59eb89bd1 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -309,6 +309,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 4dd433a39..9c3e80f6d 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 }