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.

83 lines
2.5 KiB

  1. ---
  2. apiVersion: apps/v1
  3. # This manifest deploys the contiv-ovs pod.
  4. kind: DaemonSet
  5. apiVersion: extensions/v1beta1
  6. metadata:
  7. name: contiv-ovs
  8. namespace: kube-system
  9. labels:
  10. k8s-app: contiv-ovs
  11. spec:
  12. selector:
  13. matchLabels:
  14. k8s-app: contiv-ovs
  15. template:
  16. metadata:
  17. labels:
  18. k8s-app: contiv-ovs
  19. spec:
  20. {% if kube_version is version('v1.11.1', '>=') %}
  21. priorityClassName: system-node-critical
  22. {% endif %}
  23. hostNetwork: true
  24. hostPID: true
  25. tolerations:
  26. - operator: Exists
  27. # Mark pod as critical for rescheduling (Will have no effect starting with kubernetes 1.12)
  28. - key: CriticalAddonsOnly
  29. operator: "Exists"
  30. containers:
  31. # Runs ovs containers on each Kubernetes node.
  32. - name: contiv-ovsdb-server
  33. image: {{ contiv_ovs_image_repo }}:{{ contiv_ovs_image_tag }}
  34. command: ["/scripts/start-ovsdb-server.sh"]
  35. securityContext:
  36. privileged: false
  37. # Won't work until https://github.com/contiv/ovs-docker/pull/4 is merged and image is built again
  38. env:
  39. - name: OVSDBSERVER_EXTRA_FLAGS
  40. valueFrom:
  41. configMapKeyRef:
  42. name: contiv-config
  43. key: contiv_ovsdb_server_extra_flags
  44. volumeMounts:
  45. - mountPath: /etc/openvswitch
  46. name: etc-openvswitch
  47. readOnly: false
  48. - mountPath: /var/run
  49. name: var-run
  50. readOnly: false
  51. - name: contiv-ovs-vswitchd
  52. image: {{ contiv_ovs_image_repo }}:{{ contiv_ovs_image_tag }}
  53. command: ["/scripts/start-ovs-vswitchd.sh"]
  54. securityContext:
  55. privileged: true
  56. # Won't work until https://github.com/contiv/ovs-docker/pull/4 is merged and image is built again
  57. env:
  58. - name: OVSVSWITCHD_EXTRA_FLAGS
  59. valueFrom:
  60. configMapKeyRef:
  61. name: contiv-config
  62. key: contiv_ovs_vswitchd_extra_flags
  63. volumeMounts:
  64. - mountPath: /etc/openvswitch
  65. name: etc-openvswitch
  66. readOnly: false
  67. - mountPath: /lib/modules
  68. name: lib-modules
  69. readOnly: true
  70. - mountPath: /var/run
  71. name: var-run
  72. readOnly: false
  73. volumes:
  74. # Used by contiv-ovs
  75. - name: etc-openvswitch
  76. hostPath:
  77. path: /etc/openvswitch
  78. - name: lib-modules
  79. hostPath:
  80. path: /lib/modules
  81. - name: var-run
  82. hostPath:
  83. path: /var/run