Skip to content

fix(action): Protects against current resource conflicts - #6542

Merged
thomastaylor312 merged 2 commits into
helm:dev-v3from
thomastaylor312:fix/atomic_delete
Oct 1, 2019
Merged

thomastaylor312 merged 2 commits into
helm:dev-v3from
thomastaylor312:fix/atomic_delete

Conversation

@thomastaylor312

@thomastaylor312 thomastaylor312 commented Sep 30, 2019 •

Copy link
Copy Markdown
Contributor

Currently, if using the --atomic flag or deleting a release that failed due to an already existing
resource, Helm will delete those resources that aren't managed by it. This PR fixes the issue
by checking for pre-existing resources during install and upgrade. This is done as a validation
step so the release will not even be started if resources currently exist. This PR is inspired by
@xchapter7x's work in #3477.

This also fixes a small bug in upgrade where deletes fail if the resource was already deleted

Fixes #6407

Currently, if using the --atomic flag or deleting a release that failed due to an already existing
resource, Helm will deleting those resources that aren't managed by it. This PR fixes the issue
by checking for pre-existing resources during install and upgrade. This is done as a validation
step so the release will not even be started if resources currently exist. This PR is inspired by
@xchapter7x's work in helm#3477.

This also fixes a small bug in upgrade where deletes fail if the resource was already deletes

Fixes helm#6407

Signed-off-by: Taylor Thomas <[email protected]>
@thomastaylor312 thomastaylor312 added bug Categorizes issue or PR as related to a bug. v3.x Issues and Pull Requests related to the major version v3 labels Sep 30, 2019
@thomastaylor312 thomastaylor312 added this to the 3.0.0-beta.4 milestone Sep 30, 2019
@helm-bot helm-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 30, 2019

@jlegrone jlegrone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @thomastaylor312, I haven't tested locally but the code lgtm.

Comment thread pkg/kube/client.go Resolved
Comment thread pkg/action/upgrade.go Resolved
Signed-off-by: Taylor Thomas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Categorizes issue or PR as related to a bug. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. v3.x Issues and Pull Requests related to the major version v3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants