apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: fluent-bit
  labels:
    app: fluent-bit
    chart: fluent-bit-1.6.10
    heritage: Helm
spec:
  selector:
    matchLabels:
      app: fluent-bit
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: fluent-bit
      annotations:
        checksum/config: 45db4dbdc41de54e92afc2c801476960963abf9844fb759243951bc2c2b41bd5
    spec:
      hostNetwork: false
      dnsPolicy: ClusterFirst
      serviceAccountName: fluent-bit
      containers:
        - name: fluent-bit
          image: "fluent/fluent-bit:1.6.10"
          imagePullPolicy: "Always"
          env:
            []
          resources:
            {}
          volumeMounts:
            - name: varlog
              mountPath: /var/log
            - name: varlibdockercontainers
              mountPath: /var/lib/docker/containers
              readOnly: true
            - name: config
              mountPath: /fluent-bit/etc/fluent-bit.conf
              subPath: fluent-bit.conf
            - name: config
              mountPath: /fluent-bit/etc/fluent-bit-service.conf
              subPath: fluent-bit-service.conf
            - name: config
              mountPath: /fluent-bit/etc/fluent-bit-input.conf
              subPath: fluent-bit-input.conf
            - name: config
              mountPath: /fluent-bit/etc/fluent-bit-filter.conf
              subPath: fluent-bit-filter.conf
            - name: config
              mountPath: /fluent-bit/etc/fluent-bit-output.conf
              subPath: fluent-bit-output.conf
            - name: config
              mountPath: /fluent-bit/etc/parsers_custom.conf
              subPath: parsers.conf

      terminationGracePeriodSeconds: 10
      nodeSelector:
        namespace: NAMESPACE
      tolerations:
        - key: "namespace"
          operator: "Equal"
          value: NAMESPACE
          effect: "NoSchedule"
      volumes:
        - name: varlog
          hostPath:
            path: /var/log
        - name: varlibdockercontainers
          hostPath:
            path: /var/lib/docker/containers
        - name: config
          configMap:
            name: fluent-bit-config