salt-formulas / salt-formula-haproxy

Other
7 stars 20 forks source link

Add support for tcp-check and http-check configuration #32

Closed atengler closed 7 years ago

atengler commented 7 years ago

Add support for tcp-check and http-check configuration, sample metadata:

  ...
  haproxy:
    proxy:
      listen:
        redis_cluster:
          service_name: redis
          check:
            tcp:
              enabled: True
              options:
                - send PING\r\n
                - expect string +PONG
                - send info\ replication\r\n
                - expect string role:master
                - send QUIT\r\n
                - expect string +OK
          ...

Resulting HAproxy configuration:


listen redis_cluster
  ...
  option tcp-check
  tcp-check send PING\r\n
  tcp-check expect string +PONG
  tcp-check send info\ replication\r\n
  tcp-check expect string role:master
  tcp-check send QUIT\r\n
  tcp-check expect string +OK
  ...