1.52KiB; Unix Shell | 2019-02-15 10:15:10+01 | SLOC 43
1
#!/bin/bash
2 4
{{ docker_bin_dir }}/docker run \
SC1083 This } is literal. Check expression (missing ;/\n?) or quote it. (kritika/Shell) Filter like this
SC1083 This } is literal. Check expression (missing ;/\n?) or quote it. (kritika/Shell) Filter like this
SC1009 The mentioned parser error was in this brace group. (kritika/Shell) Filter like this
SC1054 You need a space after the '{'. (kritika/Shell) Filter like this
3
  --net=host \
4
  --pid=host \
5
  --privileged \
6
  --name=kubelet \
7
  --restart=on-failure:5 \
8 6
  --memory={{ kube_memory_reserved|regex_replace('Mi', 'M') }} \
9
  --cpu-shares={{ kube_cpu_reserved|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
  -v /etc/resolv.conf:/etc/resolv.conf \
15
  {% for dir in ssl_ca_dirs -%}
16
  -v {{ dir }}:{{ dir }}:ro \
17
  {% endfor -%}
18
  {% if kubelet_load_modules -%}
19
  -v /lib/modules:/lib/modules:ro \
20
  {% endif -%}
21
  -v /sys:/sys:ro \
22
  -v {{ docker_daemon_graph }}:{{ docker_daemon_graph }}:rw \
23
  -v /var/log:/var/log:rw \
24
  -v /var/lib/kubelet:/var/lib/kubelet:shared \
25
  -v /var/lib/calico:/var/lib/calico:shared \
26
  -v /var/lib/cni:/var/lib/cni:shared \
27
  -v /var/run:/var/run:rw \
28
  {# we can run into issues with double mounting /var/lib/kubelet #}
29
  {# surely there's a better way to do this #}
30
  {% if '/var/lib/kubelet' not in kubelet_flexvolumes_plugins_dir %}
31
  -v {{ kubelet_flexvolumes_plugins_dir }}:{{ kubelet_flexvolumes_plugins_dir }}:rw \
32
  {% endif -%}
33
  {% if local_volume_provisioner_enabled -%}
34
  {% for class in local_volume_provisioner_storage_classes -%}
35
  -v {{ class.host_dir }}:{{ class.host_dir }}:rw \
36
  -v {{ class.mount_dir }}:{{ class.mount_dir }}:rw \
37
  {% endfor -%}
38
  {% endif %}
39
  -v {{kube_config_dir}}:{{kube_config_dir}}:ro \
40
  -v /etc/os-release:/etc/os-release:ro \
41
  {{ hyperkube_image_repo }}:{{ hyperkube_image_tag}} \
42
  ./hyperkube kubelet \
43
  "$@"