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.

65 lines
1.8 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. annotations:
  18. # Mark pod as critical for rescheduling (Will have no effect starting with kubernetes 1.12)
  19. scheduler.alpha.kubernetes.io/critical-pod: ''
  20. spec:
  21. {% if kube_version is version('v1.11.1', '>=') %}
  22. priorityClassName: system-node-critical
  23. {% endif %}
  24. hostNetwork: true
  25. hostPID: true
  26. tolerations:
  27. - operator: Exists
  28. # Mark pod as critical for rescheduling (Will have no effect starting with kubernetes 1.12)
  29. - key: CriticalAddonsOnly
  30. operator: "Exists"
  31. serviceAccountName: contiv-netplugin
  32. containers:
  33. - name: contiv-ovs-cleanup
  34. image: {{ contiv_ovs_image_repo }}:{{ contiv_ovs_image_tag }}
  35. command: ["/opt/cni/bin/cleanup"]
  36. securityContext:
  37. privileged: true
  38. volumeMounts:
  39. - mountPath: /etc/openvswitch
  40. name: etc-openvswitch
  41. readOnly: false
  42. - mountPath: /var/run
  43. name: var-run
  44. readOnly: false
  45. - mountPath: /opt/cni/bin
  46. name: cni-bin-dir
  47. readOnly: false
  48. readinessProbe:
  49. exec:
  50. command:
  51. - cat
  52. - /tmp/cleanup.done
  53. initialDelaySeconds: 3
  54. periodSeconds: 3
  55. successThreshold: 1
  56. volumes:
  57. - name: etc-openvswitch
  58. hostPath:
  59. path: /etc/openvswitch
  60. - name: var-run
  61. hostPath:
  62. path: /var/run
  63. - name: cni-bin-dir
  64. hostPath:
  65. path: /opt/cni/bin