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.

99 lines
2.7 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. priorityClassName: system-node-critical
  28. nodeSelector:
  29. kubernetes.io/arch: {{ image_arch }}
  30. {% if container_manager_types | length >= 2 %}
  31. kubespray.io/container_manager: {{ container_manager }}
  32. {% endif %}
  33. tolerations:
  34. - operator: Exists
  35. serviceAccountName: multus
  36. initContainers:
  37. - name: install-multus-binary
  38. image: {{ multus_image_repo }}:{{ multus_image_tag }}
  39. command: ["/install_multus"]
  40. args:
  41. - "--type"
  42. - "thin"
  43. resources:
  44. requests:
  45. cpu: "10m"
  46. memory: "15Mi"
  47. securityContext:
  48. privileged: true
  49. terminationMessagePolicy: FallbackToLogsOnError
  50. volumeMounts:
  51. - name: cnibin
  52. mountPath: {{ multus_cni_bin_dir }}
  53. mountPropagation: Bidirectional
  54. containers:
  55. - name: kube-multus
  56. image: {{ multus_image_repo }}:{{ multus_image_tag }}
  57. command: ["/thin_entrypoint"]
  58. args:
  59. - "--cni-conf-dir={{ multus_cni_conf_dir }}"
  60. - "--multus-autoconfig-dir={{ multus_cni_conf_dir }}"
  61. - "--cni-bin-dir={{ multus_cni_bin_dir }}"
  62. - "--multus-conf-file={{ multus_conf_file }}"
  63. - "--multus-kubeconfig-file-host={{ multus_kubeconfig_file_host }}"
  64. resources:
  65. requests:
  66. cpu: "100m"
  67. memory: "90Mi"
  68. limits:
  69. cpu: "100m"
  70. memory: "90Mi"
  71. securityContext:
  72. privileged: true
  73. {% if container_manager == 'crio' %}
  74. capabilities:
  75. add: ["SYS_ADMIN"]
  76. {% endif %}
  77. terminationMessagePolicy: FallbackToLogsOnError
  78. volumeMounts:
  79. {% if container_manager == 'crio' %}
  80. - name: run
  81. mountPath: {{ multus_cni_run_dir }}
  82. mountPropagation: HostToContainer
  83. {% endif %}
  84. - name: cni
  85. mountPath: {{ multus_cni_conf_dir }}
  86. - name: cnibin
  87. mountPath: {{ multus_cni_bin_dir }}
  88. volumes:
  89. {% if container_manager == 'crio' %}
  90. - name: run
  91. hostPath:
  92. path: {{ multus_cni_run_dir_host }}
  93. {% endif %}
  94. - name: cni
  95. hostPath:
  96. path: {{ multus_cni_conf_dir_host }}
  97. - name: cnibin
  98. hostPath:
  99. path: {{ multus_cni_bin_dir_host }}