You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
818 B

  1. #!/bin/bash
  2. {{ docker_bin_dir }}/docker run \
  3. --net=host \
  4. --pid=host \
  5. --privileged \
  6. --name=kubelet \
  7. --restart=on-failure:5 \
  8. --memory={{ kubelet_memory_limit|regex_replace('Mi', 'M') }} \
  9. --cpu-shares={{ kubelet_cpu_limit|regex_replace('m', '') }} \
  10. -v /dev:/dev:rw \
  11. -v /etc/cni:/etc/cni:ro \
  12. -v /opt/cni:/opt/cni:ro \
  13. -v /etc/ssl:/etc/ssl:ro \
  14. {% for dir in ssl_ca_dirs -%}
  15. -v {{ dir }}:{{ dir }}:ro \
  16. {% endfor -%}
  17. {% if kubelet_load_modules -%}
  18. -v /lib/modules:/lib/modules:ro \
  19. {% endif -%}
  20. -v /sys:/sys:ro \
  21. -v {{ docker_daemon_graph }}:/var/lib/docker:rw \
  22. -v /var/lib/kubelet:/var/lib/kubelet:shared \
  23. -v /var/run:/var/run:rw \
  24. -v {{kube_config_dir}}:{{kube_config_dir}}:ro \
  25. {{ hyperkube_image_repo }}:{{ hyperkube_image_tag}} \
  26. ./hyperkube kubelet \
  27. $@