Merge pull request #1677 from jistr/cgroup-driver
Allow setting cgroup driver for kubeletpull/1668/merge
commit
4f6362515f
|
@ -0,0 +1,8 @@
|
||||||
|
- name: look up docker cgroup driver
|
||||||
|
shell: "docker info | grep 'Cgroup Driver' | awk -F': ' '{ print $2; }'"
|
||||||
|
register: docker_cgroup_driver_result
|
||||||
|
|
||||||
|
- set_fact:
|
||||||
|
standalone_kubelet: >-
|
||||||
|
{%- if inventory_hostname in groups['kube-master'] and inventory_hostname not in groups['kube-node'] -%}true{%- else -%}false{%- endif -%}
|
||||||
|
kubelet_cgroup_driver_detected: "{{ docker_cgroup_driver_result.stdout }}"
|
|
@ -1,7 +1,5 @@
|
||||||
---
|
---
|
||||||
- set_fact:
|
- include: facts.yml
|
||||||
standalone_kubelet: >-
|
|
||||||
{%- if inventory_hostname in groups['kube-master'] and inventory_hostname not in groups['kube-node'] -%}true{%- else -%}false{%- endif -%}
|
|
||||||
tags: facts
|
tags: facts
|
||||||
|
|
||||||
- include: pre_upgrade.yml
|
- include: pre_upgrade.yml
|
||||||
|
|
|
@ -19,6 +19,7 @@ KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}"
|
||||||
{% if kube_version | version_compare('v1.7', '<') %}
|
{% if kube_version | version_compare('v1.7', '<') %}
|
||||||
--enable-cri={{ kubelet_enable_cri }} \
|
--enable-cri={{ kubelet_enable_cri }} \
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
--cgroup-driver={{ kubelet_cgroup_driver|default(kubelet_cgroup_driver_detected) }} \
|
||||||
--cgroups-per-qos={{ kubelet_cgroups_per_qos }} \
|
--cgroups-per-qos={{ kubelet_cgroups_per_qos }} \
|
||||||
--enforce-node-allocatable={{ kubelet_enforce_node_allocatable }} {% endif %}{% endset %}
|
--enforce-node-allocatable={{ kubelet_enforce_node_allocatable }} {% endif %}{% endset %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue