Skip to content

Conversation

@selslack
Copy link

What this PR does / why we need it:
Improved error message for users experiencing error described in #1193.

Special notes for your reviewer:

If applicable:

  • this PR contains documentation
  • this PR contains unit tests
  • this PR has been tested for backwards compatibility

Signed-off-by: Pavel Eremeev <selslack@users.noreply.github.com>
@helm-bot helm-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 16, 2019
kind := info.Mapping.GroupVersionKind.Kind
return fmt.Errorf("no %s with the name %q found", kind, info.Name)
return fmt.Errorf(
"%s %q is not managed by Helm; delete the resource from the current cluster state to let Helm manage it",
Copy link
Member

@bacongobbler bacongobbler Mar 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please change the error message to

kind %s with the name %q already exists in the cluster and wasn't defined in the previous release. Before upgrading, please either delete the resource from the cluster or remove it from the chart.

This error can also occur if another chart is managing the resource, so "is not managed by Helm" is not always true.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


originalInfo := original.Get(info)

// Resource exists in the current cluster state, but not in the current helm configuration
Copy link
Member

@bacongobbler bacongobbler Mar 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change this to

The resource already exists in the cluster, but it wasn't defined in the previous release. In this case, we consider it to be a resource that was previously un-managed by the release and error out, asking for the user to intervene.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Signed-off-by: Pavel Eremeev <selslack@users.noreply.github.com>
@helm-bot helm-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 25, 2019
@bacongobbler bacongobbler merged commit 15d5dee into helm:master Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants