Add an option to reserve resources for OS system daemons (#5007)
This commit is contained in:
parent
5337cff179
commit
54b1fe83f3
2 changed files with 20 additions and 1 deletions
|
@ -191,6 +191,15 @@ podsecuritypolicy_enabled: false
|
|||
# Acceptable options are 'pods', 'system-reserved', 'kube-reserved' and ''. Default is "".
|
||||
# kubelet_enforce_node_allocatable: pods
|
||||
|
||||
## Optionally reserve resources for OS system daemons.
|
||||
# system_reserved: true
|
||||
## Uncomment to override default values
|
||||
# system_memory_reserved: 512M
|
||||
# system_cpu_reserved: 500m
|
||||
## Reservation for master hosts
|
||||
# system_master_memory_reserved: 256M
|
||||
# system_master_cpu_reserved: 250m
|
||||
|
||||
# An alternative flexvolume plugin directory
|
||||
# kubelet_flexvolumes_plugins_dir: /usr/libexec/kubernetes/kubelet-plugins/volume/exec
|
||||
|
||||
|
|
|
@ -54,4 +54,14 @@ kubeReserved:
|
|||
cpu: {{ kube_cpu_reserved }}
|
||||
memory: {{ kube_memory_reserved|regex_replace('Mi', 'M') }}
|
||||
{% endif %}
|
||||
{% if system_reserved is defined and system_reserved %}
|
||||
systemReserved:
|
||||
{% if is_kube_master|bool %}
|
||||
cpu: {{ system_master_cpu_reserved|default('250m') }}
|
||||
memory: {{ system_master_memory_reserved|default('256M')|regex_replace('Mi', 'M') }}
|
||||
{% else %}
|
||||
cpu: {{ system_cpu_reserved|default('500m') }}
|
||||
memory: {{ system_memory_reserved|default('512M')|regex_replace('Mi', 'M') }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
resolvConf: "{{ kube_resolv_conf }}"
|
Loading…
Reference in a new issue