Browse Source

Fix calico-node in etcd mode (#10438)

* Calico : add ETCD endpoints to install-cni container

* Calico : remove nodename from configmap in etcd mode
pull/10705/head
Olivier Levitt 1 year ago
committed by GitHub
parent
commit
29ea790c30
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions
  1. 6
      roles/network_plugin/calico/templates/calico-config.yml.j2
  2. 7
      roles/network_plugin/calico/templates/calico-node.yml.j2

6
roles/network_plugin/calico/templates/calico-config.yml.j2

@ -36,12 +36,6 @@ data:
{% if calico_datastore == "kdd" %}
"datastore_type": "kubernetes",
"nodename": "__KUBERNETES_NODE_NAME__",
{% else %}
{% if cloud_provider is defined %}
"nodename": "{{ calico_kubelet_name.stdout }}",
{% else %}
"nodename": "{{ calico_baremetal_nodename }}",
{% endif %}
{% endif %}
"type": "calico",
"log_level": "info",

7
roles/network_plugin/calico/templates/calico-node.yml.j2

@ -96,6 +96,13 @@ spec:
# Prevents the container from sleeping forever.
- name: SLEEP
value: "false"
{% if calico_datastore == "etcd" %}
- name: ETCD_ENDPOINTS
valueFrom:
configMapKeyRef:
name: calico-config
key: etcd_endpoints
{% endif %}
{% if calico_datastore == "kdd" %}
# Set the hostname based on the k8s node name.
- name: KUBERNETES_NODE_NAME

Loading…
Cancel
Save