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.

104 lines
2.9 KiB

  1. ---
  2. apiVersion: extensions/v1beta1
  3. kind: DaemonSet
  4. metadata:
  5. name: weave-net
  6. namespace: {{ system_namespace }}
  7. labels:
  8. version: {{ weave_version }}
  9. spec:
  10. template:
  11. metadata:
  12. labels:
  13. name: weave-net
  14. annotations:
  15. scheduler.alpha.kubernetes.io/tolerations: |
  16. [
  17. {
  18. "key": "dedicated",
  19. "operator": "Equal",
  20. "value": "master",
  21. "effect": "NoSchedule"
  22. }
  23. ]
  24. spec:
  25. hostNetwork: true
  26. hostPID: true
  27. containers:
  28. - name: weave
  29. image: {{ weave_kube_image_repo }}:{{ weave_kube_image_tag }}
  30. imagePullPolicy: Always
  31. command:
  32. - /home/weave/launch.sh
  33. env:
  34. - name: IPALLOC_RANGE
  35. value: {{ kube_pods_subnet }}
  36. {% if weave_checkpoint_disable is defined %}
  37. - name: CHECKPOINT_DISABLE
  38. value: {{ weave_checkpoint_disable }}
  39. {% endif %}
  40. {% if weave_expect_npc is defined %}
  41. - name: EXPECT_NPC
  42. value: {{ weave_expect_npc }}
  43. {% endif %}
  44. {% if weave_kube_peers is defined %}
  45. - name: KUBE_PEERS
  46. value: {{ weave_kube_peers }}
  47. {% endif %}
  48. {% if weave_ipalloc_init is defined %}
  49. - name: IPALLOC_INIT
  50. value: {{ weave_ipalloc_init }}
  51. {% endif %}
  52. {% if weave_expose_ip is defined %}
  53. - name: WEAVE_EXPOSE_IP
  54. value: {{ weave_expose_ip }}
  55. {% endif %}
  56. livenessProbe:
  57. initialDelaySeconds: 60
  58. httpGet:
  59. host: 127.0.0.1
  60. path: /status
  61. port: 6784
  62. securityContext:
  63. privileged: true
  64. volumeMounts:
  65. - name: weavedb
  66. mountPath: /weavedb
  67. - name: cni-bin
  68. mountPath: /opt
  69. - name: cni-bin2
  70. mountPath: /host_home
  71. - name: cni-conf
  72. mountPath: /etc
  73. resources:
  74. requests:
  75. cpu: {{ weave_cpu_requests }}
  76. memory: {{ weave_memory_requests }}
  77. limits:
  78. cpu: {{ weave_cpu_limit }}
  79. memory: {{ weave_memory_limit }}
  80. - name: weave-npc
  81. image: {{ weave_npc_image_repo }}:{{ weave_npc_image_tag }}
  82. imagePullPolicy: Always
  83. resources:
  84. requests:
  85. cpu: {{ weave_cpu_requests }}
  86. memory: {{ weave_memory_requests }}
  87. limits:
  88. cpu: {{ weave_cpu_limit }}
  89. memory: {{ weave_memory_limit }}
  90. securityContext:
  91. privileged: true
  92. restartPolicy: Always
  93. volumes:
  94. - name: weavedb
  95. emptyDir: {}
  96. - name: cni-bin
  97. hostPath:
  98. path: /opt
  99. - name: cni-bin2
  100. hostPath:
  101. path: /home
  102. - name: cni-conf
  103. hostPath:
  104. path: /etc