blob: 2be3ed39658ab5ae4552daad78017065a3660919 [file] [log] [blame]
Sergii Golovatiuk707f7d82017-08-07 15:49:23 +02001{%- from "kubernetes/map.jinja" import common with context -%}
2{%- from "kubernetes/map.jinja" import pool with context -%}
marcoacdae7e2015-12-02 15:35:37 +01003
4# test_args has to be kept at the end, so they'll overwrite any prior configuration
Tomáš Kukrál5d33ce92017-03-21 15:15:14 +01005DAEMON_ARGS="\
6--require-kubeconfig \
7--kubeconfig=/etc/kubernetes/kubelet.kubeconfig \
Tomáš Kukrála5acf182017-03-23 13:05:25 +01008--pod-manifest-path=/etc/kubernetes/manifests \
Tomáš Kukrál5d33ce92017-03-21 15:15:14 +01009--allow-privileged={{ pool.kubelet.allow_privileged }} \
Sergii Golovatiuk707f7d82017-08-07 15:49:23 +020010--cluster_dns={{ common.addons.dns.server }} \
Matthew Mosesohn8c4ca8d2017-08-21 15:59:34 +030011--cluster_domain={{ common.addons.dns.domain|replace('_', '-') }} \
Tomáš Kukrálf3a74be2017-04-10 16:43:05 +020012--cni-bin-dir={{ pool.apiserver.get('cni_bin_dir', '/opt/cni/bin') }} \
Tomáš Kukrál6a179552017-08-25 17:30:07 +020013--hostname-override={{ pool.host.name }} \
Tomáš Kukrálf78baa62017-04-20 16:18:16 +020014--v={{ pool.get('verbosity', 2) }} \
Matthew Mosesohn3ef51c42017-05-19 12:49:24 +030015--node-labels=node-role.kubernetes.io/node=true \
Tomáš Kukrál2d538612017-05-16 09:51:06 +020016{%- if pool.network.engine in ['calico', 'opencontrail'] %}
Tomáš Kukrál5d33ce92017-03-21 15:15:14 +010017--network-plugin=cni \
18--network-plugin-dir=/etc/cni/net.d \
19{%- endif %}
20--file-check-frequency={{ pool.kubelet.frequency }} \
Matthew Mosesohn19903512017-08-31 19:38:19 +030021{%- if common.get('cloudprovider', {}).get('enabled') %}
22 --cloud-provider={{ common.cloudprovider.provider }} \
23{%- if common.get('cloudprovider', {}).get('provider') == "openstack" %}
24 --cloud-config=/etc/kubernetes/cloud-config.conf \
25{%- endif %}
26{%- endif %}
Sergii Golovatiuk707f7d82017-08-07 15:49:23 +020027{%- if common.addons.get('virtlet', {}).get('enabled') %}
Tomáš Kukrál45e7fc02017-08-10 15:32:07 +020028--container-runtime={{ pool.get('container-runtime', 'remote') }} \
29--container-runtime-endpoint={{ pool.get('container-runtime-endpoint', '/var/run/criproxy.sock') }} \
30--image-service-endpoint={{ pool.get('image-service-endpoint', '/var/run/criproxy.sock') }} \
31--enable-controller-attach-detach={{ pool.get('enable-controller-attach-detach', 'false') }} \
Sergii Golovatiuk707f7d82017-08-07 15:49:23 +020032{%- endif %}
Tomáš Kukrál5d33ce92017-03-21 15:15:14 +010033{%- for key, value in pool.get('kubelet', {}).get('daemon_opts', {}).iteritems() %}
Yuriy Taraday36f43402017-08-29 16:13:41 +040034--{{ key }}={{ value }} \
Sergii Golovatiuk707f7d82017-08-07 15:49:23 +020035{%- endfor %}
Tomáš Kukrál5d33ce92017-03-21 15:15:14 +010036"