2017-09-04 16:29:51 +08:00
|
|
|
kind: ConfigMap
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: calico-config
|
2018-03-30 19:29:13 +08:00
|
|
|
namespace: kube-system
|
2017-09-04 16:29:51 +08:00
|
|
|
data:
|
2019-04-25 20:00:48 +08:00
|
|
|
{% if calico_datastore == "etcd" %}
|
2017-10-04 20:27:55 +08:00
|
|
|
etcd_endpoints: "{{ etcd_access_addresses }}"
|
2017-09-04 16:29:51 +08:00
|
|
|
etcd_ca: "/calico-secrets/ca_cert.crt"
|
|
|
|
etcd_cert: "/calico-secrets/cert.crt"
|
|
|
|
etcd_key: "/calico-secrets/key.pem"
|
2019-10-17 22:02:38 +08:00
|
|
|
{% elif calico_datastore == "kdd" and typha_enabled %}
|
2019-04-25 20:00:48 +08:00
|
|
|
# To enable Typha, set this to "calico-typha" *and* set a non-zero value for Typha replicas
|
|
|
|
# below. We recommend using Typha if you have more than 50 nodes. Above 100 nodes it is
|
|
|
|
# essential.
|
|
|
|
typha_service_name: "calico-typha"
|
|
|
|
{% endif %}
|
2017-09-04 16:29:51 +08:00
|
|
|
{% if calico_network_backend is defined and calico_network_backend == 'none' %}
|
|
|
|
cluster_type: "kubespray"
|
2018-09-27 18:31:14 +08:00
|
|
|
calico_backend: "none"
|
|
|
|
{% else %}
|
2017-09-04 16:29:51 +08:00
|
|
|
cluster_type: "kubespray,bgp"
|
|
|
|
calico_backend: "bird"
|
2018-09-27 18:31:14 +08:00
|
|
|
{% endif %}
|
2018-02-06 08:38:05 +08:00
|
|
|
{% if inventory_hostname in groups['k8s-cluster'] and peer_with_router|default(false) %}
|
|
|
|
as: "{{ local_as|default(global_as_num) }}"
|
|
|
|
{% endif -%}
|