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.

79 lines
2.1 KiB

  1. ---
  2. kind: DaemonSet
  3. apiVersion: apps/v1
  4. metadata:
  5. {% if container_manager_types | length >= 2 %}
  6. name: kube-multus-{{ container_manager }}-{{ image_arch }}
  7. {% else %}
  8. name: kube-multus-ds-{{ image_arch }}
  9. {% endif %}
  10. namespace: kube-system
  11. labels:
  12. tier: node
  13. app: multus
  14. spec:
  15. selector:
  16. matchLabels:
  17. tier: node
  18. app: multus
  19. template:
  20. metadata:
  21. labels:
  22. tier: node
  23. app: multus
  24. spec:
  25. hostNetwork: true
  26. dnsPolicy: ClusterFirstWithHostNet
  27. nodeSelector:
  28. kubernetes.io/arch: {{ image_arch }}
  29. {% if container_manager_types | length >= 2 %}
  30. kubespray.io/container_manager: {{ container_manager }}
  31. {% endif %}
  32. tolerations:
  33. - operator: Exists
  34. serviceAccountName: multus
  35. containers:
  36. - name: kube-multus
  37. image: {{ multus_image_repo }}:{{ multus_image_tag }}
  38. command: ["/entrypoint.sh"]
  39. args:
  40. - "--cni-conf-dir={{ multus_cni_conf_dir }}"
  41. - "--cni-bin-dir={{ multus_cni_bin_dir }}"
  42. - "--multus-conf-file={{ multus_conf_file }}"
  43. - "--multus-kubeconfig-file-host={{ multus_kubeconfig_file_host }}"
  44. - "--cni-version={{ multus_cni_version }}"
  45. resources:
  46. requests:
  47. cpu: "100m"
  48. memory: "90Mi"
  49. limits:
  50. cpu: "100m"
  51. memory: "90Mi"
  52. securityContext:
  53. privileged: true
  54. {% if container_manager == 'crio' %}
  55. capabilities:
  56. add: ["SYS_ADMIN"]
  57. {% endif %}
  58. volumeMounts:
  59. {% if container_manager == 'crio' %}
  60. - name: run
  61. mountPath: {{ multus_cni_run_dir }}
  62. mountPropagation: HostToContainer
  63. {% endif %}
  64. - name: cni
  65. mountPath: {{ multus_cni_conf_dir }}
  66. - name: cnibin
  67. mountPath: {{ multus_cni_bin_dir }}
  68. volumes:
  69. {% if container_manager == 'crio' %}
  70. - name: run
  71. hostPath:
  72. path: {{ multus_cni_run_dir_host }}
  73. {% endif %}
  74. - name: cni
  75. hostPath:
  76. path: {{ multus_cni_conf_dir_host }}
  77. - name: cnibin
  78. hostPath:
  79. path: {{ multus_cni_bin_dir_host }}