Calico: update files to handle multi-asn bgp peering conditions. (#6971)

* update files to handle multi-asn bgp peering conditions.

* put back in the serviceClusterIPs.  Bad merge.

* remove extraneous environment var.

* update files as discussed with mirwan

* update titles.

* add not in.

* add a conditional for using bgp to advertise cluster ips.

Co-authored-by: marlow-h <mweston@habana.ai>
pull/6893/head
Catblade 2020-12-18 00:54:25 -06:00 committed by GitHub
parent db17ba54b4
commit 10a6bd67de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 7 deletions

View File

@ -23,6 +23,10 @@
# Global as_num (/calico/bgp/v1/global/as_num) # Global as_num (/calico/bgp/v1/global/as_num)
# global_as_num: "64512" # global_as_num: "64512"
# If doing peering with node-assigned asn where the globas does not match your nodes, you want this
# to be true. All other cases, false.
# calico_no_global_as_num: false
# You can set MTU value here. If left undefined or empty, it will # You can set MTU value here. If left undefined or empty, it will
# not be specified in calico CNI config, so Calico will use built-in # not be specified in calico CNI config, so Calico will use built-in
# defaults. The value should be a number, not a string. # defaults. The value should be a number, not a string.

View File

@ -168,7 +168,7 @@
- inventory_hostname in groups['k8s-cluster'] - inventory_hostname in groups['k8s-cluster']
run_once: yes run_once: yes
- name: Calico | Set global as_num - name: Calico | Set up BGP Configuration
command: command:
cmd: "{{ bin_dir }}/calicoctl.sh apply -f -" cmd: "{{ bin_dir }}/calicoctl.sh apply -f -"
stdin: > stdin: >
@ -179,9 +179,10 @@
}, },
"spec": { "spec": {
"logSeverityScreen": "Info", "logSeverityScreen": "Info",
{% if not calico_no_global_as_num|default(false) %}"asNumber": {{ global_as_num }},{% endif %}
"nodeToNodeMeshEnabled": {{ nodeToNodeMeshEnabled|default('true') }} , "nodeToNodeMeshEnabled": {{ nodeToNodeMeshEnabled|default('true') }} ,
"serviceExternalIPs": {{ _service_external_ips|default([]) }}, {% if calico_advertise_cluster_ips|default(false) %}"serviceClusterIPs": [{"cidr": {{ kube_service_addresses }} }],{% endif %}
"asNumber": {{ global_as_num }} }} "serviceExternalIPs": {{ _service_external_ips|default([]) }} }}
changed_when: false changed_when: false
when: when:
- inventory_hostname == groups['kube-master'][0] - inventory_hostname == groups['kube-master'][0]

View File

@ -224,10 +224,6 @@ spec:
value: "{{ calico_felix_prometheusgometricsenabled }}" value: "{{ calico_felix_prometheusgometricsenabled }}"
- name: FELIX_PROMETHEUSPROCESSMETRICSENABLED - name: FELIX_PROMETHEUSPROCESSMETRICSENABLED
value: "{{ calico_felix_prometheusprocessmetricsenabled }}" value: "{{ calico_felix_prometheusprocessmetricsenabled }}"
{% if calico_advertise_cluster_ips|default(false) %}
- name: CALICO_ADVERTISE_CLUSTER_IPS
value: "{{ kube_service_addresses }}"
{% endif %}
{% if calico_ip_auto_method is defined %} {% if calico_ip_auto_method is defined %}
- name: IP_AUTODETECTION_METHOD - name: IP_AUTODETECTION_METHOD
value: "{{ calico_ip_auto_method }}" value: "{{ calico_ip_auto_method }}"