mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-09 11:47:47 +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:
@@ -1,10 +1,10 @@
|
||||
---
|
||||
- name: Stop if either kube_control_plane or kube-node group is empty
|
||||
- name: Stop if either kube_control_plane or kube_node group is empty
|
||||
assert:
|
||||
that: "groups.get('{{ item }}')"
|
||||
with_items:
|
||||
- kube_control_plane
|
||||
- kube-node
|
||||
- kube_node
|
||||
run_once: true
|
||||
when: not ignore_assert_errors
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
that: ansible_memtotal_mb >= minimal_node_memory_mb
|
||||
when:
|
||||
- not ignore_assert_errors
|
||||
- inventory_hostname in groups['kube-node']
|
||||
- inventory_hostname in groups['kube_node']
|
||||
|
||||
# This assertion will fail on the safe side: One can indeed schedule more pods
|
||||
# on a node than the CIDR-range has space for when additional pods use the host
|
||||
@@ -99,7 +99,7 @@
|
||||
msg: "Do not schedule more pods on a node than inet addresses are available."
|
||||
when:
|
||||
- not ignore_assert_errors
|
||||
- inventory_hostname in groups['k8s-cluster']
|
||||
- inventory_hostname in groups['k8s_cluster']
|
||||
- kube_network_node_prefix is defined
|
||||
- kube_network_plugin != 'calico'
|
||||
|
||||
@@ -207,14 +207,14 @@
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
run_once: yes
|
||||
|
||||
- name: "Check that calico_rr nodes are in k8s-cluster group"
|
||||
- name: "Check that calico_rr nodes are in k8s_cluster group"
|
||||
assert:
|
||||
that:
|
||||
- '"k8s-cluster" in group_names'
|
||||
msg: "calico-rr must be a child group of k8s-cluster group"
|
||||
- '"k8s_cluster" in group_names'
|
||||
msg: "calico_rr must be a child group of k8s_cluster group"
|
||||
when:
|
||||
- kube_network_plugin == 'calico'
|
||||
- '"calico-rr" in group_names'
|
||||
- '"calico_rr" in group_names'
|
||||
|
||||
- name: "Check that kube_service_addresses is a network range"
|
||||
assert:
|
||||
|
||||
Reference in New Issue
Block a user