#
# Cookbook:: irrigate-haproxy
# Attributes:: default
#
# Author:: Russell de Moose (<rdemoose@theorchard.com>)
#

default['haproxy']['log_level']                                 = 'info'
default['haproxy']['global_max_connections']                    = 5000
default['haproxy']['chroot']                                    = '/var/lib/haproxy'
default['haproxy']['pidfile']                                   = '/var/lib/haproxy.pid'
default['haproxy']['user']                                      = 'haproxy'
default['haproxy']['group']                                     = 'haproxy'
default['haproxy']['stats_socket_path']                         = '/var/lib/haproxy/stats'
default['haproxy']['global_options']                            = ['tune.ssl.default-dh-param 2048']
default['haproxy']['cluster_name']                              = 'default'
default['haproxy']['config_file_path']                          = '/etc/haproxy/haproxy.cfg'

default['haproxy']['mode']                                      = 'http'
default['haproxy']['defaults_retries']                          = 3
default['haproxy']['defaults_timeouts']                         = {
  'queue' => '1m',
  'connect' => '10s',
  'client' => '5m',
  'server' => '5m',
  'http-keep-alive' => '1s',
  'check' => '10s',
}
default['haproxy']['defaults_options']                          = %w(httplog http-server-close dontlognull redispatch)
default['haproxy']['intermediate_ca_crl_url']                   = 'http://www.domain.com/int_url'
default['haproxy']['root_ca_crl_url']                           = 'http://www.domain.com/root_url'

default['keepalived']['shared_address']                         = false
default['keepalived']['global']['notification_emails']          = 'admin@example.com'
default['keepalived']['global']['notification_email_from']      = "keepalived@#{node['domain'] || 'example.com'}"
default['keepalived']['global']['smtp_server']                  = '127.0.0.1'
default['keepalived']['global']['smtp_connect_timeout']         = 30
default['keepalived']['global']['router_id']                    = '100'
default['keepalived']['global']['router_ids']                   = {} # node name based mapping
default['keepalived']['check_scripts']                          = {}
default['keepalived']['instance_defaults']['state']             = 'MASTER'
default['keepalived']['instance_defaults']['priority']          = 100
default['keepalived']['instance_defaults']['virtual_router_id'] = 10
default['keepalived']['sync_groups']                            = nil

# Enterprise settings
default['haproxy']['enterprise']['version']                   = '2.0r1'
default['haproxy']['enterprise']['license_key_data_bag_name'] = ''
default['haproxy']['enterprise']['license_key']               = ''
