# Flanneld configuration options

{% set flannel_opt = "-logtostderr -v " + pillar['flannel']['log_level'] + " -iface " + pillar['flannel']['iface'] + " -ip-masq" -%}
{% set http_protocol = 'http' -%}
{% if pillar['ssl']['enabled'] -%}
  {% set http_protocol = 'https' -%}
  {% set etcd_ca = "-etcd-cafile " + pillar['ssl']['ca_file'] -%}
  {% set etcd_key = "-etcd-keyfile " + pillar['ssl']['key_file'] -%}
  {% set etcd_crt = "-etcd-certfile " + pillar['ssl']['crt_file'] -%}
  {% set flannel_opt = flannel_opt + " " + etcd_ca + " " + etcd_key + " " + etcd_crt -%}
{% endif -%}

# etcd url location.  Point this to the server where etcd runs
FLANNEL_ETCD_ENDPOINTS="{{ http_protocol }}://{{ grains['caasp_fqdn'] }}:2379"

# etcd config key.  This is the configuration key that flannel queries
# For address range assignment
FLANNEL_ETCD_KEY="{{ pillar['flannel']['etcd_key'] }}"

# Any additional options that you want to pass
FLANNEL_OPTIONS="{{ flannel_opt }}"

# Flanneld configuration options

{% set flannel_opt = "-v " + pillar['flannel']['log_level'] + " -iface " + pillar['flannel']['iface'] + " -ip-masq" -%}
{% set http_protocol = 'http' -%}
{% if pillar['ssl']['enabled'] -%}
  {% set http_protocol = 'https' -%}
  {% set etcd_ca = "-etcd-cafile " + pillar['ssl']['ca_file'] -%}
  {% set etcd_key = "-etcd-keyfile " + pillar['ssl']['key_file'] -%}
  {% set etcd_crt = "-etcd-certfile " + pillar['ssl']['crt_file'] -%}
  {% set flannel_opt = flannel_opt + " " + etcd_ca + " " + etcd_key + " " + etcd_crt -%}
{% endif -%}

# etcd url location.  Point this to the server where etcd runs
FLANNEL_ETCD_ENDPOINTS="{{ http_protocol }}://{{ grains['caasp_fqdn'] }}:2379"

# etcd config key.  This is the configuration key that flannel queries
# For address range assignment
FLANNEL_ETCD_KEY="{{ pillar['flannel']['etcd_key'] }}"

# Any additional options that you want to pass
FLANNEL_OPTIONS="{{ flannel_opt }}"

Fix flannel config for 0.8.0
Fix flannel config for 0.8.0

Flannel in 0.8.0 rejects the "-logtostderr" flag we were providing, this
doesn't seem to have ever been an option, however it was silently ignored
in the past.
