diff --git a/cluster/common.sh b/cluster/common.sh index 00a4a8e937..ac9b2ac364 100755 --- a/cluster/common.sh +++ b/cluster/common.sh @@ -647,6 +647,11 @@ EOF if [ -n "${NODE_LABELS:-}" ]; then cat >>$file <>$file <>/srv/salt-overlay/pillar/cluster-params.sls node_labels: '$(echo "${NODE_LABELS}" | sed -e "s/'/''/g")' +EOF + fi + if [ -n "${EVICTION_HARD:-}" ]; then + cat <>/srv/salt-overlay/pillar/cluster-params.sls +eviction_hard: '$(echo "${EVICTION_HARD}" | sed -e "s/'/''/g")' EOF fi if [[ "${ENABLE_NODE_AUTOSCALER:-false}" == "true" ]]; then diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index a090d8bc57..2fb1d4f527 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -351,6 +351,9 @@ function start-kubelet { if [[ -n "${NODE_LABELS:-}" ]]; then flags+=" --node-labels=${NODE_LABELS}" fi + if [[ -n "${EVICTION_HARD:-}" ]]; then + flags+=" --eviction-hard=${EVICTION_HARD}" + fi if [[ "${ALLOCATE_NODE_CIDRS:-}" == "true" ]]; then flags+=" --configure-cbr0=${ALLOCATE_NODE_CIDRS}" fi diff --git a/cluster/saltbase/salt/kubelet/default b/cluster/saltbase/salt/kubelet/default index 255faeb59d..b72e1a6e98 100644 --- a/cluster/saltbase/salt/kubelet/default +++ b/cluster/saltbase/salt/kubelet/default @@ -196,5 +196,10 @@ {% set node_labels="--node-labels=" + pillar['node_labels'] %} {% endif -%} +{% set eviction_hard = "" %} +{% if pillar['eviction_hard'] is defined -%} + {% set eviction_hard="--eviction-hard=" + pillar['eviction_hard'] %} +{% endif -%} + # test_args has to be kept at the end, so they'll overwrite any prior configuration -DAEMON_ARGS="{{daemon_args}} {{api_servers_with_port}} {{debugging_handlers}} {{hostname_override}} {{cloud_provider}} {{cloud_config}} {{config}} {{manifest_url}} --allow-privileged={{pillar['allow_privileged']}} {{log_level}} {{cluster_dns}} {{cluster_domain}} {{docker_root}} {{kubelet_root}} {{configure_cbr0}} {{non_masquerade_cidr}} {{cgroup_root}} {{system_container}} {{pod_cidr}} {{ master_kubelet_args }} {{cpu_cfs_quota}} {{network_plugin}} {{kubelet_port}} {{experimental_flannel_overlay}} {{ reconcile_cidr_args }} {{ hairpin_mode }} {{enable_custom_metrics}} {{runtime_container}} {{kubelet_container}} {{node_labels}} {{babysit_daemons}} {{test_args}}" +DAEMON_ARGS="{{daemon_args}} {{api_servers_with_port}} {{debugging_handlers}} {{hostname_override}} {{cloud_provider}} {{cloud_config}} {{config}} {{manifest_url}} --allow-privileged={{pillar['allow_privileged']}} {{log_level}} {{cluster_dns}} {{cluster_domain}} {{docker_root}} {{kubelet_root}} {{configure_cbr0}} {{non_masquerade_cidr}} {{cgroup_root}} {{system_container}} {{pod_cidr}} {{ master_kubelet_args }} {{cpu_cfs_quota}} {{network_plugin}} {{kubelet_port}} {{experimental_flannel_overlay}} {{ reconcile_cidr_args }} {{ hairpin_mode }} {{enable_custom_metrics}} {{runtime_container}} {{kubelet_container}} {{node_labels}} {{babysit_daemons}} {{eviction_hard}} {{test_args}}"