Merge pull request #1677 from jistr/cgroup-driver

Allow setting cgroup driver for kubelet
This commit is contained in:
Bogdan Dobrelya 2017-09-21 17:31:48 +02:00 committed by GitHub
commit 4f6362515f
3 changed files with 10 additions and 3 deletions

View file

@ -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 }}"

View file

@ -1,7 +1,5 @@
---
- set_fact:
standalone_kubelet: >-
{%- if inventory_hostname in groups['kube-master'] and inventory_hostname not in groups['kube-node'] -%}true{%- else -%}false{%- endif -%}
- include: facts.yml
tags: facts
- include: pre_upgrade.yml

View file

@ -19,6 +19,7 @@ KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}"
{% if kube_version | version_compare('v1.7', '<') %}
--enable-cri={{ kubelet_enable_cri }} \
{% endif %}
--cgroup-driver={{ kubelet_cgroup_driver|default(kubelet_cgroup_driver_detected) }} \
--cgroups-per-qos={{ kubelet_cgroups_per_qos }} \
--enforce-node-allocatable={{ kubelet_enforce_node_allocatable }} {% endif %}{% endset %}