blob: 5c47d35b1b8495d9bacf12d0e7c647d6561fed64 [file] [log] [blame]
{%- from "kubernetes/map.jinja" import common with context -%}
{%- from "kubernetes/map.jinja" import pool with context -%}
# test_args has to be kept at the end, so they'll overwrite any prior configuration
DAEMON_ARGS="\
--experimental-dockershim \
--port 11250 \
--kubeconfig=/etc/kubernetes/kubelet.kubeconfig \
--pod-manifest-path=/etc/kubernetes/manifests \
--address={{ pool.kubelet.address }} \
--allow-privileged={{ pool.kubelet.allow_privileged }} \
--cluster_dns={{ common.addons.dns.server }} \
--cluster_domain={{ common.addons.dns.domain|replace('_', '-') }} \
{%- if common.get('cloudprovider', {}).get('enabled') and common.get('cloudprovider', {}).get('provider') == 'openstack' %}
--hostname-override={{ pool.host.name }}.{{ common.cluster_domain }} \
{%- else %}
--hostname-override={{ pool.host.name }} \
{%- endif %}
--v={{ pool.get('verbosity', 2) }} \
{%- if common.hyperkube.pause_image is defined %}
--pod-infra-container-image={{ common.hyperkube.pause_image }} \
{%- endif %}
{%- if pillar.kubernetes.master is defined %}
--node-labels=node-role.kubernetes.io/master=true \
{%- if pillar.kubernetes.get('master', {}).get('unschedulable', 'false') %}
--register-with-taints=node-role.kubernetes.io/master=:NoSchedule \
{%- endif -%}
{%- else %}
--node-labels=node-role.kubernetes.io/node=true \
{%- endif %}
--network-plugin=cni \
--cni-bin-dir={{ pool.apiserver.get('cni_bin_dir', '/opt/cni/bin') }} \
--file-check-frequency={{ pool.kubelet.frequency }} \
{%- if common.get('cloudprovider', {}).get('enabled') %}
--cloud-provider=external \
{%- if common.get('cloudprovider', {}).get('provider') == 'openstack' %}
--cloud-config=/etc/kubernetes/cloud-config \
{%- endif %}
{%- endif %}
--enable-controller-attach-detach={{ pool.get('enable-controller-attach-detach', 'false') }} \
{%- for key, value in pool.get('kubelet', {}).get('daemon_opts', {}).items() %}
--{{ key }}={{ value }} \
{%- endfor %}
"