Repository navigation
helm install when resources already exist will fail - #3477
xchapter7x wants to merge 4 commits into
Conversation
- addresses todo for testing methods with clientset calls (https://github.com/kubernetes/helm/blob/master/pkg/kube/client_test.go#L199) [helm#3319]
|
hi @bacongobbler, @technosophos, I just wanted to follow up and see if you had any thoughts about this PR? Feedback is be welcome and much appreciated. Thanks. -John |
|
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
|
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
|
Hi @xchapter7x. Thanks for taking the time to write up a PR for this. At the time I did not have enough experience with cc @thomastaylor312. What do you think about merging this one into Helm 2 and porting it over to Helm 3? Seems like it'd fix the issues we were discussing about the |
|
The big thing here is that we can’t check in the |
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]>
|
I implemented this using your handy function @xchapter7x in #6542 for v3. Based on what I see here with your PR, my one worry is that a release may still get created and cause issues when someone tries to delete it, but I've been going back and forth between the v2 and v3 codebase that I could be wrong. |
|
@thomastaylor312 @bacongobbler Let me know if I can help with more contributions moving forward. Keep up the great work 👍 |
|
Thanks @xchapter7x! Given the complexity in this change we aren't planning on moving this through for Helm 2, however thank you for catalyzing the movement on Helm 3! |
This is a PR to fix the issue described here: #3319
Createcall is not able to complete successfully, due to a conflicting pre-existing resource.I decided to implement this pre-existing resource check within the kubeclient. Reason being, if a
Createcall can not actually create the resource b/c the resource already exists, then one would expect the call to return an error.This seemed more appropriate then implementing a check in the tiller package as part of the
InstallReleasecall, as tiller knows only about installing a release, and that it has a client interface upon which it can callCreate. It shouldn't need to know anything about the expected behavior of the client Create call, and its handling of pre-existing resources.The kubeclient Create implementation borrows the approach taken in the Update call on the kubeclient. Obvious difference being, update will skip pre-existing resources and create will now fail on pre-existing resources.