cni-daemonset.yaml.j2 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # More info about the template: https://docs.openstack.org/kuryr-kubernetes/latest/installation/containerized.html#generating-kuryr-resource-definitions-for-kubernetes
  2. apiVersion: extensions/v1beta1
  3. kind: DaemonSet
  4. metadata:
  5. name: kuryr-cni-ds
  6. namespace: {{ kuryr_namespace }}
  7. labels:
  8. tier: node
  9. app: kuryr
  10. spec:
  11. template:
  12. metadata:
  13. labels:
  14. tier: node
  15. app: kuryr
  16. spec:
  17. hostNetwork: true
  18. tolerations:
  19. - key: node-role.kubernetes.io/master
  20. operator: Exists
  21. effect: NoSchedule
  22. serviceAccountName: kuryr-controller
  23. containers:
  24. - name: kuryr-cni
  25. image: {{ openshift_openstack_kuryr_cni_image }}
  26. imagePullPolicy: IfNotPresent
  27. command: [ "cni_ds_init" ]
  28. env:
  29. - name: CNI_DAEMON
  30. value: "True"
  31. - name: KUBERNETES_NODE_NAME
  32. valueFrom:
  33. fieldRef:
  34. fieldPath: spec.nodeName
  35. securityContext:
  36. privileged: true
  37. volumeMounts:
  38. - name: bin
  39. mountPath: /opt/cni/bin
  40. - name: net-conf
  41. mountPath: /etc/cni/net.d
  42. - name: config-volume
  43. mountPath: /tmp/kuryr/kuryr.conf
  44. subPath: kuryr-cni.conf
  45. - name: etc
  46. mountPath: /etc
  47. - name: proc
  48. mountPath: /host_proc
  49. - name: openvswitch
  50. mountPath: /var/run/openvswitch
  51. volumes:
  52. - name: bin
  53. hostPath:
  54. path: {{ cni_bin_dir }}
  55. - name: net-conf
  56. hostPath:
  57. path: /etc/cni/net.d
  58. - name: config-volume
  59. configMap:
  60. name: kuryr-config
  61. - name: etc
  62. hostPath:
  63. path: /etc
  64. - name: proc
  65. hostPath:
  66. path: /proc
  67. - name: openvswitch
  68. hostPath:
  69. path: /var/run/openvswitch