kubevela / kubevela/terraform-controller
Deleting a configuration causes kubectl to hang indefinitely
- Dominant language
- Go
- Stars
- 163
- Forks
- 74
- PR merge metrics
- No merged PRs in 30d
Description
When destroying a configuration resource kubectl will hang indefinitely.
With a configuration called 'myconfig' run `kubectl delete configuration myconfig`. 'configuration.terraform.core.oam.dev "myconfig" deleted' is returned and then kubectl hangs, presumably due to the finalizer 'configuration.finalizers.terraform-controller'. Even if I wait for the destroy job associated with the configuration to complete, the kubectl command for deleting the resource never returns. The same issue occurs whether the destroy job succeeds, or fails.
Workaround:
To get the configuration to be removed the only solution I have found requires editing the configuration resource manually to remove the finalizer, replacing it with `null`.
Kubectl version is `v1.20.8` on client and server.
The issue has been reproduced on both `v0.1.16` and master.
Contributor guide
Research direction
Reproduce the issue with `kubectl delete configuration myconfig` and inspect the controller's handling of the `configuration.finalizers.terraform-controller` finalizer and its destroy job. Done means deletion returns after the destroy job succeeds or fails, without manually editing the resource to remove the finalizer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes, terraform
- Domain
- backend, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100