daemonset-vector.yaml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. - name: VECTOR_LOG_LEVEL
  40. value: trace
  41. - name: VECTOR_INTERNAL_LOG_RATE_SECS
  42. value: "0"
  43. volumeMounts:
  44. - name: varlog
  45. mountPath: /var/log
  46. readOnly: true
  47. - name: docker-containers
  48. mountPath: /var/lib/docker/containers
  49. readOnly: true
  50. - name: kubelet-pods
  51. mountPath: /var/lib/kubelet/pods
  52. readOnly: true
  53. - name: vector-data
  54. mountPath: /var/lib/vector
  55. - name: vector-config
  56. mountPath: /etc/vector
  57. readOnly: true
  58. volumes:
  59. - name: varlog
  60. hostPath:
  61. path: /var/log
  62. type: DirectoryOrCreate
  63. - name: docker-containers
  64. hostPath:
  65. path: /var/lib/docker/containers
  66. type: DirectoryOrCreate
  67. - name: kubelet-pods
  68. hostPath:
  69. path: /var/lib/kubelet/pods
  70. type: DirectoryOrCreate
  71. - name: vector-data
  72. hostPath:
  73. path: /var/lib/vector
  74. type: DirectoryOrCreate
  75. - name: vector-config
  76. configMap:
  77. name: vector-config
  78. terminationGracePeriodSeconds: 30