-
Notifications
You must be signed in to change notification settings - Fork 32
scheduler: implement /health endpoint for k8s and docker #1253
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
Conversation
Sometimes process might get stuck, and this compromise whole idea of scheduler, as events will get lost and etc. We can implement http server thread that will watch for variable that is updated every "loop". If variable not updated anymore, loop is not working anymore. Signed-off-by: Denys Fedoryshchenko <[email protected]>
a48ba38
to
2a0797a
Compare
Signed-off-by: Denys Fedoryshchenko <[email protected]>
Signed-off-by: Denys Fedoryshchenko <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
super().__init__(server_address, RequestHandlerClass) | ||
self.last_heartbeat = last_heartbeat | ||
|
||
server = CustomHTTPServer(('0.0.0.0', 8080), HealthHandler, last_heartbeat) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know listen address was hardcoded to get the probe running quickly (same goes to FAILURE_TIMEOUT
).
I'm still pointing it out to assure you I do read your patches before LGTMing them ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :)
@@ -68,22 +92,6 @@ spec: | |||
- name: tmpsecrets | |||
mountPath: /home/kernelci/.azure | |||
subPath: k8s-credentials/.azure | |||
initContainers: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please correct me if I'm wrong: this change is just a cleanup to group both initContainers
together, not a functional one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, i just spotted mistake when i was editing file. Not best approach to mix in PR, but at least did as separate commit. I was afraid yaml failure might lead to other failures, e.g. to read health section.
Signed-off-by: Denys Fedoryshchenko <[email protected]>
8b58976
to
eb0067f
Compare
Sometimes process might get stuck, and this compromise whole idea of scheduler, as events will get lost and etc.
We can implement http server thread that will watch for variable that is updated every "loop". If variable not updated anymore, loop is not working anymore.
Depends-on: kernelci/kernelci-core#2923