-
Notifications
You must be signed in to change notification settings - Fork 86
Conversation
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.
This is awesome! I was thinking it was going to be a pain to figure out how to make the process "crash", but using a liveness probe here takes that pain away.
<-stopCh | ||
log.Info("Stopped OpenStack discoverer") | ||
} | ||
|
||
func healthzHandler(w http.ResponseWriter, r *http.Request) { | ||
_, err := reconciler.ProjectLister.ListProjects() |
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.
Is it customary to discard this error? I am wondering if it makes sense to either log it or print it out in the HTTP response
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.
We could, the goal here is just to understand if the API is healthy or not. I'd expect the logic portions of the controller to log their errors in context.
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.
Yeah, that makes sense to me. I think we can move forward with discarding this error.
8afbdf3
to
67797a6
Compare
…a Probes Signed-off-by: Steve Sloka <steves@heptio.com>
Signed-off-by: Steve Sloka <steves@heptio.com>
67797a6
to
8e1b5b3
Compare
Fixes #142 by adding a
/healthz
endpoint and a default liveness probe to the Openstack discoverer. This is should detect the issue when the discoverer cannot authenticate properly to Openstack and cause the pod to restart.