Skip to content
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

Replace busy wait loops with kubectl wait #374

Open
aditighag opened this issue Jun 25, 2021 · 2 comments
Open

Replace busy wait loops with kubectl wait #374

aditighag opened this issue Jun 25, 2021 · 2 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@aditighag
Copy link
Member

Replace busy wait loops with the wait functionality exposed by kubectl - https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#wait. It supports waiting for deleted resources too.

Alternatively, the command can wait for the given set of resources to be deleted by providing the "delete" keyword as the value to the --for flag.

@aditighag aditighag self-assigned this Jun 25, 2021
@pchaigno pchaigno added the good first issue Good for newcomers label Jun 28, 2021
@aditighag aditighag removed their assignment Jul 30, 2021
@squeed
Copy link
Contributor

squeed commented Sep 13, 2022

So, kubectl wait, under the hood, is setting up an informer and watching the resource in question -- it doesn't do anything too magical. Anyplace we're busy-looping, we could theoretically replace that with a watch off the shared informer factory.

I'll take a look.

@ChrsMark
Copy link
Contributor

ChrsMark commented Nov 22, 2022

Hi @aditighag @squeed, is anyone working on this right now?
We had a look with @ioandr and we would like to work on a fix for this issue.

We are up for providing an initial PR to replace the busy-wait loops with informers in https://github.com/cilium/cilium-cli/blob/master/install/uninstall.go. Then, if we are satisfied with the solution, we can further apply it to the rest of the codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants