arturictus / sidekiq_alive

Liveness probe for Sidekiq in Kubernetes deployments
MIT License
189 stars 57 forks source link

Add support for custom URLs in ENV file #30

Closed hectorakemp closed 4 years ago

sunny commented 4 years ago

Hi hector! I am curious as to what the use-case is, is it because you are mounting the app inside another that you would need to configure a URL different than /?

arturictus commented 4 years ago

Hi @hectorakemp, I'm curious as well, why do you want to change the url?

hectorakemp commented 4 years ago

Hey guys, thanks for responding. It's because I expose a custom URL over HTTP so I can use Wormly to get SMS and email alerts for downtime. I'm using an ingress tied to my domain to do this, so having a custom URL allows me to redirect it to the sidekiq_alive K8s service at the load balancer level, and then redirect every other route to my regular application.

Example ingress spec:

spec:
  rules:
  - http:
      paths:
      - path: /alive
        backend:
          serviceName: foo-bar-sidekiq-service
          servicePort: 80
      - path: /*
        backend:
          serviceName: foo-bar-web-server
          servicePort: 80

Hope this makes it clearer.

reginaldosousa commented 4 years ago

I am using gitlab auto-devops to deploy my application. Therefore, the worker’s livenessProbe path must be the same as the application’s livenessProbe path. This PR solves my use case.

arturictus commented 4 years ago

Added in #36 and relased from 2.0.3