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

[POA-2781] Implement pods health checker #77

Conversation

mudit-postman
Copy link
Contributor

@mudit-postman mudit-postman commented Feb 7, 2025

In this PR, we have added a worker which will keep on check the status for pods for which we are running pidump process

  • Start a ticker which will keep on checking the health regularly
  • If pod's status moves to a final state, i.e., Suceeded or Failed then call the apidump stop process

@mudit-postman mudit-postman marked this pull request as ready for review February 7, 2025 15:42
for podName, podStatus := range podStatuses {
if podStatus == string(coreV1.PodSucceeded) || podStatus == string(coreV1.PodFailed) {
printer.Infof("pod %s has stopped running", podStatus)
d.StopApiDumpProcess(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds an additional case where concurrency may occur in StopApiDumpProcess; we may learn about a stopped pod nearly-simultaneously from this worker and from the event channel. I think that is manageable, but it has to be considered.

@mudit-postman mudit-postman merged commit 87c6814 into mudit/poa-2780-http-client-changes Feb 11, 2025
1 of 2 checks passed
@mudit-postman mudit-postman deleted the mudit/poa-2781-pods-health-check-worker branch February 11, 2025 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants