apiVersion: v1
data:
  config.json: |
    {
        "command": "/usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid",
        "config_files": [{
            "source": "/var/lib/kolla/config_files/haproxy.cfg",
            "dest": "/etc/haproxy/haproxy.cfg",
            "owner": "root",
            "perm": "0644"
        }]
    }
  haproxy.cfg: |
    global
      chroot /var/lib/haproxy
      user haproxy
      group haproxy
      daemon
      log /var/lib/kolla/heka/log local0
      maxconn 4000
      # commented out for now. Doesn't work on haproxy from kolla 2.x
      # its unused anyway.
      #stats socket /var/lib/kolla/haproxy/haproxy.sock

    defaults
      log global
      mode http
      option redispatch
      option httplog
      option forwardfor
      retries 3
      timeout http-request 10s
      timeout queue 1m
      timeout connect 10s
      timeout client 1m
      timeout server 1m
      timeout check 10s

    listen api
      bind 0.0.0.0:9696
      server local-api 127.0.0.1:8080 check inter 2000 rise 2 fall 5
kind: ConfigMap
metadata:
  name: neutron-server-haproxy
