2019-05-09 04:38:36 +08:00
|
|
|
KUBE_LOG_LEVEL="--v={{ kube_log_level }}"
|
|
|
|
KUBELET_ADDRESS="--node-ip={{ kubelet_address }}"
|
|
|
|
{% if kube_override_hostname|default('') %}
|
|
|
|
KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}"
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{# Base kubelet args #}
|
|
|
|
{% set kubelet_args_base -%}
|
|
|
|
{# start kubeadm specific settings #}
|
|
|
|
--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf \
|
|
|
|
--config={{ kube_config_dir }}/kubelet-config.yaml \
|
|
|
|
--kubeconfig={{ kube_config_dir }}/kubelet.conf \
|
|
|
|
{# end kubeadm specific settings #}
|
|
|
|
--runtime-cgroups={{ kubelet_runtime_cgroups }} \
|
|
|
|
{% endset %}
|
|
|
|
|
2023-11-24 04:13:55 +08:00
|
|
|
KUBELET_ARGS="{{ kubelet_args_base }} {{ kubelet_custom_flags | join(' ') }}"
|
2019-10-17 11:08:38 +08:00
|
|
|
{% if kubelet_flexvolumes_plugins_dir is defined %}
|
|
|
|
KUBELET_VOLUME_PLUGIN="--volume-plugin-dir={{ kubelet_flexvolumes_plugins_dir }}"
|
|
|
|
{% endif %}
|
2022-06-06 23:18:22 +08:00
|
|
|
{% if kube_network_plugin is defined and kube_network_plugin == "cloud" %}
|
2019-05-09 04:38:36 +08:00
|
|
|
KUBELET_NETWORK_PLUGIN="--hairpin-mode=promiscuous-bridge --network-plugin=kubenet"
|
|
|
|
{% endif %}
|
2024-11-05 00:30:04 +08:00
|
|
|
{% if cloud_provider == "external" %}
|
2023-02-20 17:07:40 +08:00
|
|
|
KUBELET_CLOUDPROVIDER="--cloud-provider={{ cloud_provider }}"
|
2019-05-09 04:38:36 +08:00
|
|
|
{% else %}
|
|
|
|
KUBELET_CLOUDPROVIDER=""
|
|
|
|
{% endif %}
|
|
|
|
|
2019-06-28 15:35:38 +08:00
|
|
|
PATH={{ bin_dir }}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|