trento-project / trento

An open cloud-native web console improving on the work day of SAP Applications administrators.
https://www.trento-project.io
Apache License 2.0
33 stars 25 forks source link

Add liveness/readiness probes to trento-runner #281

Open fabriziosestito opened 2 years ago

fabriziosestito commented 2 years ago

We need to add liveness and readiness probe to the trento-runner, since right now we use /usr/bin/true as an hack.

arbulu89 commented 2 years ago

@fabriziosestito Could you elaborate more? I don't understand what's the real meaning of the ticket

fabriziosestito commented 2 years ago

Kubernetes needs to know if the pod is ready and alive. Right now we hacked around it by tricking k8s thinking it is alive using /usr/bin/true/ as the probes (since it returns always true the pod is considered to be alive and ready). This is obviously an hack, for the trento-web we already have this since we provide the health api.

Refer to this for more info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/

stefanotorresi commented 2 years ago

Actually, Fabrizio, I removed the hack and disabled the probes altogether because it was causing the runner container some problems at startup.

fabriziosestito commented 2 years ago

This fixed the probe in the distroless containers, but do you think we still need to implement those two?

stefanotorresi commented 2 years ago

I'm not sure how would we make probing meaningful to assess the status of the runner. It's just a background worker process, so I guess for now we just assume that if it's up, it's okay. We could instrument it properly, for sure, but I'm afraid that's a bit of a stretch goal right now!

arbulu89 commented 2 years ago

As a comment, we will remove ARA sooner than later, so I wouldn't invest much time implementing something rock-solid. We want just some solution that makes the current Demo environment usable.