daemonset-vector.yaml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. apiVersion: apps/v1
  2. kind: DaemonSet
  3. metadata:
  4. name: vector
  5. namespace: {{ .Release.Namespace }}
  6. labels:
  7. app: vector
  8. spec:
  9. selector:
  10. matchLabels:
  11. app: vector
  12. template:
  13. metadata:
  14. labels:
  15. app: vector
  16. spec:
  17. serviceAccountName: vector
  18. nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
  19. tolerations: {{ toYaml .Values.tolerations | nindent 8 }}
  20. affinity: {{ toYaml .Values.affinity | nindent 8 }}
  21. containers:
  22. - name: vector
  23. image: "{{ .Values.vector.image.repository }}:{{ .Values.vector.image.tag }}"
  24. imagePullPolicy: IfNotPresent
  25. resources:
  26. limits:
  27. cpu: {{ .Values.vector.resources.limits.cpu }}
  28. memory: {{ .Values.vector.resources.limits.memory }}
  29. requests:
  30. cpu: {{ .Values.vector.resources.requests.cpu }}
  31. memory: {{ .Values.vector.resources.requests.memory }}
  32. env:
  33. - name: VECTOR_CONFIG
  34. value: /etc/vector/vector.toml
  35. - name: VECTOR_SELF_NODE_NAME
  36. valueFrom:
  37. fieldRef:
  38. fieldPath: spec.nodeName
  39. volumeMounts:
  40. - name: varlog
  41. mountPath: /var/log
  42. readOnly: true
  43. - name: docker-containers
  44. mountPath: /var/lib/docker/containers
  45. readOnly: true
  46. - name: kubelet-pods
  47. mountPath: /var/lib/kubelet/pods
  48. readOnly: true
  49. - name: vector-data
  50. mountPath: /var/lib/vector
  51. - name: vector-config
  52. mountPath: /etc/vector
  53. readOnly: true
  54. volumes:
  55. - name: varlog
  56. hostPath:
  57. path: /var/log
  58. type: DirectoryOrCreate
  59. - name: docker-containers
  60. hostPath:
  61. path: /var/lib/docker/containers
  62. type: DirectoryOrCreate
  63. - name: kubelet-pods
  64. hostPath:
  65. path: /var/lib/kubelet/pods
  66. type: DirectoryOrCreate
  67. - name: vector-data
  68. hostPath:
  69. path: /var/lib/vector
  70. type: DirectoryOrCreate
  71. - name: vector-config
  72. configMap:
  73. name: vector-config
  74. terminationGracePeriodSeconds: 30