mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-18 11:40:10 -03:30
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:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- hosts: kube-node
|
||||
- hosts: kube_node
|
||||
become: False
|
||||
|
||||
tasks:
|
||||
|
||||
@@ -11,9 +11,13 @@ instance-1
|
||||
[kube-master]
|
||||
instance-1
|
||||
|
||||
# TODO(cristicalin): Remove kube-node,k8s-cluster groups from this file after releasing v2.16.
|
||||
[kube-node]
|
||||
instance-2
|
||||
|
||||
[kube_node]
|
||||
instance-2
|
||||
|
||||
[etcd]
|
||||
instance-3
|
||||
{% elif mode is defined and mode in ["ha", "ha-scale"] %}
|
||||
@@ -28,6 +32,9 @@ instance-2
|
||||
[kube-node]
|
||||
instance-3
|
||||
|
||||
[kube_node]
|
||||
instance-3
|
||||
|
||||
[etcd]
|
||||
instance-1
|
||||
instance-2
|
||||
@@ -42,6 +49,9 @@ instance-1
|
||||
[kube-node]
|
||||
instance-2
|
||||
|
||||
[kube_node]
|
||||
instance-2
|
||||
|
||||
[etcd]
|
||||
instance-1
|
||||
{% elif mode == "aio" %}
|
||||
@@ -54,6 +64,9 @@ instance-1
|
||||
[kube-node]
|
||||
instance-1
|
||||
|
||||
[kube_node]
|
||||
instance-1
|
||||
|
||||
[etcd]
|
||||
instance-1
|
||||
{% elif mode == "ha-recover" %}
|
||||
@@ -68,6 +81,9 @@ instance-2
|
||||
[kube-node]
|
||||
instance-3
|
||||
|
||||
[kube_node]
|
||||
instance-3
|
||||
|
||||
[etcd]
|
||||
instance-3
|
||||
instance-1
|
||||
@@ -92,6 +108,9 @@ instance-2
|
||||
[kube-node]
|
||||
instance-3
|
||||
|
||||
[kube_node]
|
||||
instance-3
|
||||
|
||||
[etcd]
|
||||
instance-3
|
||||
instance-1
|
||||
@@ -111,6 +130,11 @@ kube-node
|
||||
kube-master
|
||||
calico-rr
|
||||
|
||||
[calico-rr]
|
||||
[k8s_cluster:children]
|
||||
kube_node
|
||||
kube_master
|
||||
calico_rr
|
||||
|
||||
[calico_rr]
|
||||
|
||||
[fake_hosts]
|
||||
|
||||
@@ -6,7 +6,7 @@ node3 ansible_ssh_host={{ec2.instances[2].public_ip}} ansible_ssh_user={{ssh_use
|
||||
node1
|
||||
node2
|
||||
|
||||
[kube-node]
|
||||
[kube_node]
|
||||
node1
|
||||
node2
|
||||
node3
|
||||
@@ -15,12 +15,12 @@ node3
|
||||
node1
|
||||
node2
|
||||
|
||||
[k8s-cluster:children]
|
||||
kube-node
|
||||
[k8s_cluster:children]
|
||||
kube_node
|
||||
kube_control_plane
|
||||
calico-rr
|
||||
calico_rr
|
||||
|
||||
[calico-rr]
|
||||
[calico_rr]
|
||||
|
||||
[broken_kube_control_plane]
|
||||
node2
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
[kube_control_plane]
|
||||
{{droplets.results[0].droplet.name}}
|
||||
|
||||
[kube-node]
|
||||
[kube_node]
|
||||
{{droplets.results[1].droplet.name}}
|
||||
|
||||
[etcd]
|
||||
@@ -16,7 +16,7 @@
|
||||
{{droplets.results[0].droplet.name}}
|
||||
{{droplets.results[1].droplet.name}}
|
||||
|
||||
[kube-node]
|
||||
[kube_node]
|
||||
{{droplets.results[2].droplet.name}}
|
||||
|
||||
[etcd]
|
||||
@@ -32,16 +32,16 @@
|
||||
[kube_control_plane]
|
||||
{{droplets.results[0].droplet.name}}
|
||||
|
||||
[kube-node]
|
||||
[kube_node]
|
||||
{{droplets.results[1].droplet.name}}
|
||||
|
||||
[etcd]
|
||||
{{droplets.results[0].droplet.name}}
|
||||
{% endif %}
|
||||
|
||||
[calico-rr]
|
||||
[calico_rr]
|
||||
|
||||
[k8s-cluster:children]
|
||||
kube-node
|
||||
[k8s_cluster:children]
|
||||
kube_node
|
||||
kube_control_plane
|
||||
calico-rr
|
||||
calico_rr
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
[kube_control_plane]
|
||||
{{node1}}
|
||||
|
||||
[kube-node]
|
||||
[kube_node]
|
||||
{{node2}}
|
||||
|
||||
[etcd]
|
||||
@@ -23,7 +23,7 @@
|
||||
{{node1}}
|
||||
{{node2}}
|
||||
|
||||
[kube-node]
|
||||
[kube_node]
|
||||
{{node3}}
|
||||
|
||||
[etcd]
|
||||
@@ -41,7 +41,7 @@
|
||||
[kube_control_plane]
|
||||
{{node1}}
|
||||
|
||||
[kube-node]
|
||||
[kube_node]
|
||||
{{node2}}
|
||||
|
||||
[etcd]
|
||||
@@ -50,24 +50,24 @@
|
||||
[kube_control_plane]
|
||||
{{node1}}
|
||||
|
||||
[kube-node]
|
||||
[kube_node]
|
||||
{{node1}}
|
||||
|
||||
[etcd]
|
||||
{{node1}}
|
||||
{% endif %}
|
||||
|
||||
[k8s-cluster:children]
|
||||
kube-node
|
||||
[k8s_cluster:children]
|
||||
kube_node
|
||||
kube_control_plane
|
||||
calico-rr
|
||||
calico_rr
|
||||
|
||||
[calico-rr]
|
||||
[calico_rr]
|
||||
|
||||
{% if mode is defined and mode in ["scale", "separate-scale", "ha-scale"] %}
|
||||
[fake_hosts]
|
||||
fake_scale_host[1:200]
|
||||
|
||||
[kube-node:children]
|
||||
[kube_node:children]
|
||||
fake_hosts
|
||||
{% endif %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- hosts: kube-node
|
||||
- hosts: kube_node
|
||||
tasks:
|
||||
- name: Test tunl0 routes
|
||||
shell: "set -o pipefail && ! /sbin/ip ro | grep '/26 via' | grep -v tunl0"
|
||||
@@ -9,7 +9,7 @@
|
||||
- (ipip|default(true) or cloud_provider is defined)
|
||||
- kube_network_plugin|default('calico') == 'calico'
|
||||
|
||||
- hosts: k8s-cluster
|
||||
- hosts: k8s_cluster
|
||||
vars:
|
||||
agent_report_interval: 10
|
||||
netcheck_namespace: default
|
||||
@@ -44,7 +44,7 @@
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: nca_pod
|
||||
until: nca_pod.stdout_lines|length >= groups['k8s-cluster']|intersect(ansible_play_hosts)|length * 2
|
||||
until: nca_pod.stdout_lines|length >= groups['k8s_cluster']|intersect(ansible_play_hosts)|length * 2
|
||||
retries: 3
|
||||
delay: 10
|
||||
failed_when: false
|
||||
@@ -76,7 +76,7 @@
|
||||
delay: "{{ agent_report_interval }}"
|
||||
until: agents.content|length > 0 and
|
||||
agents.content[0] == '{' and
|
||||
agents.content|from_json|length >= groups['k8s-cluster']|intersect(ansible_play_hosts)|length * 2
|
||||
agents.content|from_json|length >= groups['k8s_cluster']|intersect(ansible_play_hosts)|length * 2
|
||||
failed_when: false
|
||||
no_log: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user