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.

105 lines
3.1 KiB

  1. apiVersion: apps/v1
  2. kind: DaemonSet
  3. metadata:
  4. name: node-feature-discovery-worker
  5. namespace: {{ node_feature_discovery_namespace }}
  6. labels:
  7. app.kubernetes.io/name: node-feature-discovery
  8. role: worker
  9. spec:
  10. selector:
  11. matchLabels:
  12. app.kubernetes.io/name: node-feature-discovery
  13. role: worker
  14. template:
  15. metadata:
  16. labels:
  17. app.kubernetes.io/name: node-feature-discovery
  18. role: worker
  19. spec:
  20. dnsPolicy: ClusterFirstWithHostNet
  21. serviceAccountName: {{ node_feature_discovery_worker_sa_name }}
  22. containers:
  23. - name: worker
  24. securityContext:
  25. allowPrivilegeEscalation: false
  26. capabilities:
  27. drop:
  28. - ALL
  29. readOnlyRootFilesystem: true
  30. runAsNonRoot: true
  31. image: {{ node_feature_discovery_image_repo }}:{{ node_feature_discovery_image_tag }}
  32. imagePullPolicy: IfNotPresent
  33. env:
  34. - name: NODE_NAME
  35. valueFrom:
  36. fieldRef:
  37. fieldPath: spec.nodeName
  38. command:
  39. - "nfd-worker"
  40. args:
  41. - "-server=node-feature-discovery-master:8080"
  42. {% if not node_feature_discovery_enable_nodefeature_api %}
  43. - "-enable-nodefeature-api=false"
  44. {% endif %}
  45. - "-metrics=8081"
  46. ports:
  47. - name: metrics
  48. containerPort: 8081
  49. volumeMounts:
  50. - name: host-boot
  51. mountPath: "/host-boot"
  52. readOnly: true
  53. - name: host-os-release
  54. mountPath: "/host-etc/os-release"
  55. readOnly: true
  56. - name: host-sys
  57. mountPath: "/host-sys"
  58. readOnly: true
  59. - name: host-usr-lib
  60. mountPath: "/host-usr/lib"
  61. readOnly: true
  62. - name: host-lib
  63. mountPath: "/host-lib"
  64. readOnly: true
  65. - name: source-d
  66. mountPath: "/etc/kubernetes/node-feature-discovery/source.d/"
  67. readOnly: true
  68. - name: features-d
  69. mountPath: "/etc/kubernetes/node-feature-discovery/features.d/"
  70. readOnly: true
  71. - name: nfd-worker-conf
  72. mountPath: "/etc/kubernetes/node-feature-discovery"
  73. readOnly: true
  74. volumes:
  75. - name: host-boot
  76. hostPath:
  77. path: "/boot"
  78. - name: host-os-release
  79. hostPath:
  80. path: "/etc/os-release"
  81. - name: host-sys
  82. hostPath:
  83. path: "/sys"
  84. - name: host-usr-lib
  85. hostPath:
  86. path: "/usr/lib"
  87. - name: host-lib
  88. hostPath:
  89. path: "/lib"
  90. - name: source-d
  91. hostPath:
  92. path: "/etc/kubernetes/node-feature-discovery/source.d/"
  93. - name: features-d
  94. hostPath:
  95. path: "/etc/kubernetes/node-feature-discovery/features.d/"
  96. - name: nfd-worker-conf
  97. configMap:
  98. name: node-feature-discovery-worker-conf
  99. items:
  100. - key: nfd-worker.conf
  101. path: nfd-worker.conf
  102. {% if node_feature_discovery_worker_tolerations %}
  103. tolerations:
  104. {{ node_feature_discovery_worker_tolerations | to_yaml(indent=2, width=1337) | indent(width=8) }}
  105. {% endif %}