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.

62 lines
1.6 KiB

  1. ---
  2. kind: DaemonSet
  3. apiVersion: extensions/v1beta1
  4. metadata:
  5. name: contiv-cleanup
  6. namespace: kube-system
  7. labels:
  8. k8s-app: contiv-cleanup
  9. spec:
  10. selector:
  11. matchLabels:
  12. k8s-app: contiv-cleanup
  13. template:
  14. metadata:
  15. labels:
  16. k8s-app: contiv-cleanup
  17. spec:
  18. {% if kube_version is version('v1.11.1', '>=') %}
  19. priorityClassName: system-node-critical
  20. {% endif %}
  21. hostNetwork: true
  22. hostPID: true
  23. tolerations:
  24. - operator: Exists
  25. # Mark pod as critical for rescheduling (Will have no effect starting with kubernetes 1.12)
  26. - key: CriticalAddonsOnly
  27. operator: "Exists"
  28. serviceAccountName: contiv-netplugin
  29. containers:
  30. - name: contiv-ovs-cleanup
  31. image: {{ contiv_ovs_image_repo }}:{{ contiv_ovs_image_tag }}
  32. command: ["/opt/cni/bin/cleanup"]
  33. securityContext:
  34. privileged: true
  35. volumeMounts:
  36. - mountPath: /etc/openvswitch
  37. name: etc-openvswitch
  38. readOnly: false
  39. - mountPath: /var/run
  40. name: var-run
  41. readOnly: false
  42. - mountPath: /opt/cni/bin
  43. name: cni-bin-dir
  44. readOnly: false
  45. readinessProbe:
  46. exec:
  47. command:
  48. - cat
  49. - /tmp/cleanup.done
  50. initialDelaySeconds: 3
  51. periodSeconds: 3
  52. successThreshold: 1
  53. volumes:
  54. - name: etc-openvswitch
  55. hostPath:
  56. path: /etc/openvswitch
  57. - name: var-run
  58. hostPath:
  59. path: /var/run
  60. - name: cni-bin-dir
  61. hostPath:
  62. path: /opt/cni/bin