cni-daemonset.yaml.j2 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. {% if enable_kuryr_cni_probes|default(true)|bool %}
  54. readinessProbe:
  55. httpGet:
  56. path: /ready
  57. port: {{ kuryr_healthcheck_port }}
  58. scheme: HTTP
  59. initialDelaySeconds: 15
  60. timeoutSeconds: 5
  61. livenessProbe:
  62. httpGet:
  63. path: /alive
  64. port: {{ kuryr_healthcheck_port }}
  65. initialDelaySeconds: 15
  66. {% endif %}
  67. volumes:
  68. - name: bin
  69. hostPath:
  70. path: {{ cni_bin_dir }}
  71. - name: net-conf
  72. hostPath:
  73. path: /etc/cni/net.d
  74. - name: config-volume
  75. configMap:
  76. name: kuryr-config
  77. - name: proc
  78. hostPath:
  79. path: /proc
  80. - name: openvswitch
  81. hostPath:
  82. path: /var/run/openvswitch