Assert that IP range is enough for the nodes (#8720)
* Assert that IP range is enough for the nodes Co-authored-by: Necatican Yıldırım <necaticanyildirim@gmail.com> * Fixed whitespace * Fixed errors * Fixed errors Co-authored-by: Necatican Yıldırım <necaticanyildirim@gmail.com>
This commit is contained in:
parent
674ec92224
commit
0d6ea85167
1 changed files with 7 additions and 0 deletions
|
@ -183,6 +183,13 @@
|
||||||
msg: "kube_pods_subnet cannot be the same network segment as kube_service_addresses"
|
msg: "kube_pods_subnet cannot be the same network segment as kube_service_addresses"
|
||||||
run_once: yes
|
run_once: yes
|
||||||
|
|
||||||
|
- name: "Check that IP range is enough for the nodes"
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- 2 ** (kube_network_node_prefix - kube_pods_subnet | ipaddr('prefix')) >= groups['k8s_cluster'] | length
|
||||||
|
msg: "Not enough IPs are available for the desired node count."
|
||||||
|
run_once: yes
|
||||||
|
|
||||||
- name: Stop if unknown dns mode
|
- name: Stop if unknown dns mode
|
||||||
assert:
|
assert:
|
||||||
that: dns_mode in ['coredns', 'coredns_dual', 'manual', 'none']
|
that: dns_mode in ['coredns', 'coredns_dual', 'manual', 'none']
|
||||||
|
|
Loading…
Reference in a new issue