[connectivity] Retry deleting namespace while waiting #976
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When https://github.com/yahoo/k8s-namespace-guard is setup and the connectivity tests are run with
--force-deploy
, this loop gets stuck waiting for the namespace to be deleted. This is because it takes a while for the pods to get removed after the deployment is gone but, the namespace-guard has already rejected the original deletion request.In my testing, the simplest fix is to just add the deletion here which does work once the pods are gone. The logic just above this already takes care of issuing the delete request for objects that the namespace-guard cares about, there's simply a race between those commands and line 646.