mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 05:45:06 +03:00
Fix calico-node in etcd mode (#10438)
* Calico : add ETCD endpoints to install-cni container * Calico : remove nodename from configmap in etcd mode
This commit is contained in:
@@ -36,12 +36,6 @@ data:
|
|||||||
{% if calico_datastore == "kdd" %}
|
{% if calico_datastore == "kdd" %}
|
||||||
"datastore_type": "kubernetes",
|
"datastore_type": "kubernetes",
|
||||||
"nodename": "__KUBERNETES_NODE_NAME__",
|
"nodename": "__KUBERNETES_NODE_NAME__",
|
||||||
{% else %}
|
|
||||||
{% if cloud_provider is defined %}
|
|
||||||
"nodename": "{{ calico_kubelet_name.stdout }}",
|
|
||||||
{% else %}
|
|
||||||
"nodename": "{{ calico_baremetal_nodename }}",
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
"type": "calico",
|
"type": "calico",
|
||||||
"log_level": "info",
|
"log_level": "info",
|
||||||
|
|||||||
@@ -96,6 +96,13 @@ spec:
|
|||||||
# Prevents the container from sleeping forever.
|
# Prevents the container from sleeping forever.
|
||||||
- name: SLEEP
|
- name: SLEEP
|
||||||
value: "false"
|
value: "false"
|
||||||
|
{% if calico_datastore == "etcd" %}
|
||||||
|
- name: ETCD_ENDPOINTS
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: calico-config
|
||||||
|
key: etcd_endpoints
|
||||||
|
{% endif %}
|
||||||
{% if calico_datastore == "kdd" %}
|
{% if calico_datastore == "kdd" %}
|
||||||
# Set the hostname based on the k8s node name.
|
# Set the hostname based on the k8s node name.
|
||||||
- name: KUBERNETES_NODE_NAME
|
- name: KUBERNETES_NODE_NAME
|
||||||
|
|||||||
Reference in New Issue
Block a user