grafana / pdc-agent

Private Datasource Connect Agent
Apache License 2.0
25 stars 9 forks source link

Add functionality that can be used as a livenessProbe / Healthcheck #26

Open dafydd-t opened 1 year ago

dafydd-t commented 1 year ago

Consider adding functionality that can be used in Kubernetes liveness probes & docker HEALTHCHECKs to determine whether the pdc-agent is running successfully.

Both of these technologies allow liveness to be determined via a command. One approach we could take is to use the existence of a file as a signal that the container is healthy. See an example in the kubernetes doc.

We should put this behind a feature flag to avoid creating unneccessary files on user systems in the case where the agent is not being run on Docker / k8s.

dafydd-t commented 5 months ago

I think the basic requirement here will be achieved by #41 , where we can use a 2xx response from the /metrics path as a liveness probe.