daemonset.yaml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. apiVersion: apps/v1
  2. kind: DaemonSet
  3. metadata:
  4. name: {{ template "fluent-bit-loki.fullname" . }}
  5. namespace: {{ .Release.Namespace }}
  6. labels:
  7. app: {{ template "fluent-bit-loki.name" . }}
  8. chart: {{ template "fluent-bit-loki.chart" . }}
  9. release: {{ .Release.Name }}
  10. heritage: {{ .Release.Service }}
  11. annotations:
  12. {{- toYaml .Values.annotations | nindent 4 }}
  13. spec:
  14. selector:
  15. matchLabels:
  16. app: {{ template "fluent-bit-loki.name" . }}
  17. release: {{ .Release.Name }}
  18. updateStrategy:
  19. type: {{ .Values.deploymentStrategy }}
  20. {{- if ne .Values.deploymentStrategy "RollingUpdate" }}
  21. rollingUpdate: null
  22. {{- end }}
  23. template:
  24. metadata:
  25. labels:
  26. app: {{ template "fluent-bit-loki.name" . }}
  27. release: {{ .Release.Name }}
  28. {{- with .Values.podLabels }}
  29. {{- toYaml . | nindent 8 }}
  30. {{- end }}
  31. annotations:
  32. checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
  33. {{- with .Values.podAnnotations }}
  34. {{- toYaml . | nindent 8 }}
  35. {{- end }}
  36. spec:
  37. serviceAccountName: {{ template "fluent-bit-loki.serviceAccountName" . }}
  38. {{- if .Values.priorityClassName }}
  39. priorityClassName: {{ .Values.priorityClassName }}
  40. {{- end }}
  41. {{- if .Values.image.pullSecrets }}
  42. imagePullSecrets:
  43. {{- range .Values.image.pullSecrets }}
  44. - name: {{ . }}
  45. {{- end }}
  46. {{- end }}
  47. containers:
  48. - name: fluent-bit-loki
  49. image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
  50. imagePullPolicy: {{ .Values.image.pullPolicy }}
  51. volumeMounts:
  52. - name: config
  53. mountPath: /fluent-bit/etc
  54. - name: run
  55. mountPath: /run/fluent-bit
  56. {{- with .Values.volumeMounts }}
  57. {{- toYaml . | nindent 12 }}
  58. {{- end }}
  59. ports:
  60. - containerPort: {{ .Values.config.port }}
  61. name: http-metrics
  62. resources:
  63. {{- toYaml .Values.resources | nindent 12 }}
  64. nodeSelector:
  65. {{- toYaml .Values.nodeSelector | nindent 8 }}
  66. affinity:
  67. {{- toYaml .Values.affinity | nindent 8 }}
  68. tolerations:
  69. {{- toYaml .Values.tolerations | nindent 8 }}
  70. terminationGracePeriodSeconds: 10
  71. volumes:
  72. - name: config
  73. configMap:
  74. name: {{ template "fluent-bit-loki.fullname" . }}
  75. - name: run
  76. hostPath:
  77. path: /run/fluent-bit
  78. {{- with .Values.volumes }}
  79. {{- toYaml . | nindent 8 }}
  80. {{- end }}