diff --git a/pkg/cmd/install.go b/pkg/cmd/install.go index 832968ff0..8b28f5054 100644 --- a/pkg/cmd/install.go +++ b/pkg/cmd/install.go @@ -127,6 +127,21 @@ supply a version number with the '--version' flag. To see the list of chart repositories, use 'helm repo list'. To search for charts in a repository, use 'helm search'. + +RESOURCE OWNERSHIP + +When Helm installs a chart, it adds the following metadata to every Kubernetes +resource it creates: + + - Label: app.kubernetes.io/managed-by=Helm + - Annotation: meta.helm.sh/release-name= + - Annotation: meta.helm.sh/release-namespace= + +These are used to track ownership. If a resource already exists in the cluster +without this metadata, or with metadata pointing to a different release or +namespace, Helm will refuse to install and return an error. To adopt such +pre-existing resources into the release, use '--take-ownership'. Helm will then +add the ownership metadata and manage those resources going forward. ` func newInstallCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { diff --git a/pkg/cmd/upgrade.go b/pkg/cmd/upgrade.go index 9ec4f4ef2..f640f2da9 100644 --- a/pkg/cmd/upgrade.go +++ b/pkg/cmd/upgrade.go @@ -80,6 +80,19 @@ or '--set' flags. Priority is given to new values. The --dry-run flag will output all generated chart manifests, including Secrets which can contain sensitive values. To hide Kubernetes Secrets use the --hide-secret flag. Please carefully consider how and when these flags are used. + +RESOURCE OWNERSHIP + +Helm tracks ownership of Kubernetes resources using the following metadata: + + - Label: app.kubernetes.io/managed-by=Helm + - Annotation: meta.helm.sh/release-name= + - Annotation: meta.helm.sh/release-namespace= + +During an upgrade, if a resource exists in the cluster without this metadata +(or with metadata pointing to a different release or namespace), Helm will +return an error. To take ownership of such resources and have Helm manage them +going forward, use '--take-ownership'. ` func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {