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.

86 lines
2.7 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. annotations:
  20. # Mark pod as critical for rescheduling (Will have no effect starting with kubernetes 1.12)
  21. scheduler.alpha.kubernetes.io/critical-pod: ''
  22. spec:
  23. {% if kube_version is version('v1.11.1', '>=') %}
  24. priorityClassName: system-node-critical
  25. {% endif %}
  26. hostNetwork: true
  27. hostPID: true
  28. tolerations:
  29. - operator: Exists
  30. # Mark pod as critical for rescheduling (Will have no effect starting with kubernetes 1.12)
  31. - key: CriticalAddonsOnly
  32. operator: "Exists"
  33. containers:
  34. # Runs ovs containers on each Kubernetes node.
  35. - name: contiv-ovsdb-server
  36. image: {{ contiv_ovs_image_repo }}:{{ contiv_ovs_image_tag }}
  37. command: ["/scripts/start-ovsdb-server.sh"]
  38. securityContext:
  39. privileged: false
  40. # Won't work until https://github.com/contiv/ovs-docker/pull/4 is merged and image is built again
  41. env:
  42. - name: OVSDBSERVER_EXTRA_FLAGS
  43. valueFrom:
  44. configMapKeyRef:
  45. name: contiv-config
  46. key: contiv_ovsdb_server_extra_flags
  47. volumeMounts:
  48. - mountPath: /etc/openvswitch
  49. name: etc-openvswitch
  50. readOnly: false
  51. - mountPath: /var/run
  52. name: var-run
  53. readOnly: false
  54. - name: contiv-ovs-vswitchd
  55. image: {{ contiv_ovs_image_repo }}:{{ contiv_ovs_image_tag }}
  56. command: ["/scripts/start-ovs-vswitchd.sh"]
  57. securityContext:
  58. privileged: true
  59. # Won't work until https://github.com/contiv/ovs-docker/pull/4 is merged and image is built again
  60. env:
  61. - name: OVSVSWITCHD_EXTRA_FLAGS
  62. valueFrom:
  63. configMapKeyRef:
  64. name: contiv-config
  65. key: contiv_ovs_vswitchd_extra_flags
  66. volumeMounts:
  67. - mountPath: /etc/openvswitch
  68. name: etc-openvswitch
  69. readOnly: false
  70. - mountPath: /lib/modules
  71. name: lib-modules
  72. readOnly: true
  73. - mountPath: /var/run
  74. name: var-run
  75. readOnly: false
  76. volumes:
  77. # Used by contiv-ovs
  78. - name: etc-openvswitch
  79. hostPath:
  80. path: /etc/openvswitch
  81. - name: lib-modules
  82. hostPath:
  83. path: /lib/modules
  84. - name: var-run
  85. hostPath:
  86. path: /var/run