cni-daemonset.yaml.j2 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. - name: KURYR_CNI_POD_NAME
  36. valueFrom:
  37. fieldRef:
  38. fieldPath: metadata.name
  39. securityContext:
  40. privileged: true
  41. volumeMounts:
  42. - name: bin
  43. mountPath: /opt/cni/bin
  44. - name: net-conf
  45. mountPath: /etc/cni/net.d
  46. - name: config-volume
  47. mountPath: /etc/kuryr/kuryr.conf
  48. subPath: kuryr-cni.conf
  49. - name: proc
  50. mountPath: /host_proc
  51. - name: openvswitch
  52. mountPath: /var/run/openvswitch
  53. readinessProbe:
  54. httpGet:
  55. path: /ready
  56. port: {{ kuryr_healthcheck_port }}
  57. scheme: HTTP
  58. initialDelaySeconds: 15
  59. timeoutSeconds: 5
  60. livenessProbe:
  61. httpGet:
  62. path: /alive
  63. port: {{ kuryr_healthcheck_port }}
  64. initialDelaySeconds: 15
  65. volumes:
  66. - name: bin
  67. hostPath:
  68. path: {{ cni_bin_dir }}
  69. - name: net-conf
  70. hostPath:
  71. path: /etc/cni/net.d
  72. - name: config-volume
  73. configMap:
  74. name: kuryr-config
  75. - name: proc
  76. hostPath:
  77. path: /proc
  78. - name: openvswitch
  79. hostPath:
  80. path: /var/run/openvswitch