I have a project that just consumes messages from Rabbit MQ, and I'm using Net Core 2.1.. I just create a "Console Application" with hosted service and everything is working fine.
Now I need to deploy it to Openshift and configure Liveness Probe, So I have 2 options:
Create an API in my application to respond when /health URL is called. Remember that I don't have ASP.NET Core dependencies in my project, I will need to add a lot of dependencies just because of /health URL. Anti-Pattern maybe ??
Make Liveness Probe execute a command inside my POD (like
ps -eaf) to check if my application is running. I really think this can return a "false-positive" and not very accurate like /health.
So, what is the best solution and most used for a worker using Openshift Liveness Probe ?