Set default value for disable_shared_pid (#1710)

PID namespace sharing is disabled only in Kubernetes 1.7.
Explicitily enabling it by default could help reduce unexpected
results when upgrading to or downgrading from 1.7.
This commit is contained in:
Hyunsun Moon 2017-10-11 22:55:51 +09:00 committed by Matthew Mosesohn
parent e5426f74a8
commit adf575b75e
3 changed files with 5 additions and 1 deletions

View file

@ -20,7 +20,9 @@ kubelet_enable_cri: true
kubelet_cgroups_per_qos: true kubelet_cgroups_per_qos: true
# Set to empty to avoid cgroup creation # Set to empty to avoid cgroup creation
kubelet_enforce_node_allocatable: "\"\"" kubelet_enforce_node_allocatable: "\"\""
# Set false to enable sharing a pid namespace between containers in a pod.
# Note that PID namespace sharing requires docker >= 1.13.1.
kubelet_disable_shared_pid: true
# Limits for kube components and nginx load balancer app # Limits for kube components and nginx load balancer app
kubelet_memory_limit: 512M kubelet_memory_limit: 512M

View file

@ -27,6 +27,7 @@ KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}"
--kube-reserved cpu={{ kubelet_cpu_limit }},memory={{ kubelet_memory_limit|regex_replace('Mi', 'M') }} \ --kube-reserved cpu={{ kubelet_cpu_limit }},memory={{ kubelet_memory_limit|regex_replace('Mi', 'M') }} \
--node-status-update-frequency={{ kubelet_status_update_frequency }} \ --node-status-update-frequency={{ kubelet_status_update_frequency }} \
--cgroup-driver={{ kubelet_cgroup_driver|default(kubelet_cgroup_driver_detected) }} \ --cgroup-driver={{ kubelet_cgroup_driver|default(kubelet_cgroup_driver_detected) }} \
--docker-disable-shared-pid={{ kubelet_disable_shared_pid }} \
{% endset %} {% endset %}
{# DNS settings for kubelet #} {# DNS settings for kubelet #}

View file

@ -14,6 +14,7 @@ KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}"
--pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_image_tag }} \ --pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_image_tag }} \
--kube-reserved cpu={{ kubelet_cpu_limit }},memory={{ kubelet_memory_limit|regex_replace('Mi', 'M') }} \ --kube-reserved cpu={{ kubelet_cpu_limit }},memory={{ kubelet_memory_limit|regex_replace('Mi', 'M') }} \
--node-status-update-frequency={{ kubelet_status_update_frequency }} \ --node-status-update-frequency={{ kubelet_status_update_frequency }} \
--docker-disable-shared-pid={{ kubelet_disable_shared_pid }} \
{% if kube_version | version_compare('v1.6', '>=') %} {% if kube_version | version_compare('v1.6', '>=') %}
{# flag got removed with 1.7.0 #} {# flag got removed with 1.7.0 #}
{% if kube_version | version_compare('v1.7', '<') %} {% if kube_version | version_compare('v1.7', '<') %}