mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +03:00
Rename ansible groups to use _ instead of - (#7552)
* rename ansible groups to use _ instead of -
k8s-cluster -> k8s_cluster
k8s-node -> k8s_node
calico-rr -> calico_rr
no-floating -> no_floating
Note: kube-node,k8s-cluster groups in upgrade CI
need clean-up after v2.16 is tagged
* ensure old groups are mapped to the new ones
This commit is contained in:
@@ -193,7 +193,7 @@
|
||||
nodeToNodeMeshEnabled: "false"
|
||||
when:
|
||||
- peer_with_router|default(false) or peer_with_calico_rr|default(false)
|
||||
- inventory_hostname in groups['k8s-cluster']
|
||||
- inventory_hostname in groups['k8s_cluster']
|
||||
run_once: yes
|
||||
|
||||
- name: Calico | Set up BGP Configuration
|
||||
@@ -264,7 +264,7 @@
|
||||
until: output.rc == 0
|
||||
delay: "{{ retry_stagger | random + 3 }}"
|
||||
with_items:
|
||||
- "{{ groups['calico-rr'] | default([]) }}"
|
||||
- "{{ groups['calico_rr'] | default([]) }}"
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
- peer_with_calico_rr|default(false)
|
||||
@@ -290,7 +290,7 @@
|
||||
until: output.rc == 0
|
||||
delay: "{{ retry_stagger | random + 3 }}"
|
||||
with_items:
|
||||
- "{{ groups['calico-rr'] | default([]) }}"
|
||||
- "{{ groups['calico_rr'] | default([]) }}"
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
- peer_with_calico_rr|default(false)
|
||||
@@ -368,9 +368,9 @@
|
||||
delay: "{{ retry_stagger | random + 3 }}"
|
||||
when:
|
||||
- peer_with_router|default(false)
|
||||
- inventory_hostname in groups['k8s-cluster']
|
||||
- inventory_hostname in groups['k8s_cluster']
|
||||
- local_as is defined
|
||||
- groups['calico-rr'] | default([]) | length == 0
|
||||
- groups['calico_rr'] | default([]) | length == 0
|
||||
|
||||
- name: Calico | Configure peering with router(s) at node scope
|
||||
command:
|
||||
@@ -396,4 +396,4 @@
|
||||
- "{{ peers|selectattr('scope','undefined')|list|default([]) | union(peers|selectattr('scope','defined')|selectattr('scope','equalto', 'node')|list|default([])) }}"
|
||||
when:
|
||||
- peer_with_router|default(false)
|
||||
- inventory_hostname in groups['k8s-cluster']
|
||||
- inventory_hostname in groups['k8s_cluster']
|
||||
|
||||
@@ -22,6 +22,6 @@ data:
|
||||
cluster_type: "kubespray,bgp"
|
||||
calico_backend: "bird"
|
||||
{% endif %}
|
||||
{% if inventory_hostname in groups['k8s-cluster'] and peer_with_router|default(false) %}
|
||||
{% if inventory_hostname in groups['k8s_cluster'] and peer_with_router|default(false) %}
|
||||
as: "{{ local_as|default(global_as_num) }}"
|
||||
{% endif -%}
|
||||
|
||||
Reference in New Issue
Block a user