mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 22:04:43 +03:00
Added configurable min memory assertions (#4307)
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
3cc351dff9
commit
27a99e0a3f
@@ -49,3 +49,7 @@ etc_hosts_localhost_entries:
|
|||||||
unexpected:
|
unexpected:
|
||||||
- localhost
|
- localhost
|
||||||
- localhost.localdomain
|
- localhost.localdomain
|
||||||
|
|
||||||
|
# Minimal memory requirement in MB for safety checks
|
||||||
|
minimal_node_memory_mb: 1024
|
||||||
|
minimal_master_memory_mb: 1500
|
||||||
|
|||||||
@@ -60,13 +60,13 @@
|
|||||||
|
|
||||||
- name: Stop if memory is too small for masters
|
- name: Stop if memory is too small for masters
|
||||||
assert:
|
assert:
|
||||||
that: ansible_memtotal_mb >= 1500
|
that: ansible_memtotal_mb >= minimal_master_memory_mb
|
||||||
ignore_errors: "{{ ignore_assert_errors }}"
|
ignore_errors: "{{ ignore_assert_errors }}"
|
||||||
when: inventory_hostname in groups['kube-master']
|
when: inventory_hostname in groups['kube-master']
|
||||||
|
|
||||||
- name: Stop if memory is too small for nodes
|
- name: Stop if memory is too small for nodes
|
||||||
assert:
|
assert:
|
||||||
that: ansible_memtotal_mb >= 1024
|
that: ansible_memtotal_mb >= minimal_node_memory_mb
|
||||||
ignore_errors: "{{ ignore_assert_errors }}"
|
ignore_errors: "{{ ignore_assert_errors }}"
|
||||||
when: inventory_hostname in groups['kube-node']
|
when: inventory_hostname in groups['kube-node']
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user