4

I have the following file:

version: '2'
services:
  service1:
    scale: 1
    health_check:
      port: 80
      request_line: GET /healthcheck HTTP/1.0
      interval: 2000
      initializing_timeout: 60000
      reinitializing_timeout: 60000
      unhealthy_threshold: 3
      strategy: recreate
      healthy_threshold: 2
      response_timeout: 2000

However, the end result is that the unhealthy image still gets pushed up.

Is there a configuration to say if unhealthy, abort?

For reference, we are using Rancher 1.6

jipot
  • 304
  • 3
  • 13
  • 34
  • What do you mean by unhealthy image? You can setup custom checks on a particular service or host. You are supposed to be checking the health checks of your services deployed in the cluster. Your question lacks clarity. I think you have got the wrong idea the health checks are not for pushing or pulling the images. They are for alerting and keeping the service up and running and report if something is off. – redzack Dec 23 '21 at 18:14

0 Answers0