-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Setting wait
on a kubectl_manifest
resource changes the delete cascade mode
#156
Comments
The answer is simple, legacy :) This gavinbunney/terraform-provider-kubectl#153 PR in original provider was needed to fix the gavinbunney/terraform-provider-kubectl#109. (where you've participated as well :p ) Without it, what was happening is that it would fire the delete command but it will not wait for the actual result, which was causing a missing dependency chain reaction. In theory, it would be possible to amend the functionality to bring it close to the original kubectl, but it would be a breaking change and would need to go towards 3.0 release |
@alekc my question was more around why couldn't the original implementation mirror the Exposing the delete cascade option and fixing the wait when using the background option shouldn't need a |
It could (tbh I would prefer it to have the same behaviour as kubectl), but I can only put it on 3.x release to avoid breaking pipelines for other people. |
@alekc I've opened a PR to allow the delete cascade to be specified without changing the current defaults. |
@alekc do you have a rough ETA for when this will be released? |
I need to review (and amend if needed given the latest merge) #157, a round of manual testing and it can go live. I would expect the end of the week top (sadly the life doesn't leave a lot of extra time) |
When the
wait
argument is set on akubectl_manifest
resource the delete is modified to usemeta_v1.DeletePropagationForeground
instead of the defaultmeta_v1.DeletePropagationBackground
which is the default behaviour of using thekubectl
binary directly to delete. It looks like this behaviour was introduced a while ago but I can't see any justification as to why the change was required. By not following the defaultkubectl
behaviour it causes issues and is very hard to debug.terraform-provider-kubectl/kubernetes/resource_kubectl_manifest.go
Lines 724 to 726 in e18d5ad
I'd like to see the default changed back to
meta_v1.DeletePropagationBackground
so this provider functions the same askubectl
. The cascade option could then be exposed as an argument (e.g.delete_cascade
) to support settingmeta_v1.DeletePropagationForeground
; this could also be used to implement #145.The text was updated successfully, but these errors were encountered: