apiVersion: apps/v1
kind: DaemonSet
metadata:
  labels:
    app.kubernetes.io/instance: RELEASE-NAME
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: fluent-bit
    app.kubernetes.io/version: 1.8.12
    helm.sh/chart: fluent-bit-0.19.18
  name: RELEASE-NAME-fluent-bit
spec:
  selector:
    matchLabels:
      app.kubernetes.io/instance: RELEASE-NAME
      app.kubernetes.io/name: fluent-bit
  template:
    metadata:
      annotations:
        checksum/config: 4c3fddd696be168ddfa12321a1c40f6bba4e3958d141615a7962fe538cfc2b04
        checksum/luascripts: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
      labels:
        app.kubernetes.io/instance: RELEASE-NAME
        app.kubernetes.io/name: fluent-bit
    spec:
      containers:
      - image: fluent/fluent-bit:1.8.12
        imagePullPolicy: Always
        livenessProbe:
          httpGet:
            path: /
            port: http
        name: fluent-bit
        ports:
        - containerPort: 2020
          name: http
          protocol: TCP
        readinessProbe:
          httpGet:
            path: /api/v1/health
            port: http
        volumeMounts:
        - mountPath: /fluent-bit/etc/fluent-bit.conf
          name: config
          subPath: fluent-bit.conf
        - mountPath: /fluent-bit/etc/custom_parsers.conf
          name: config
          subPath: custom_parsers.conf
        - mountPath: /var/log
          name: varlog
        - mountPath: /var/lib/docker/containers
          name: varlibdockercontainers
          readOnly: true
        - mountPath: /etc/machine-id
          name: etcmachineid
          readOnly: true
      dnsPolicy: ClusterFirst
      hostNetwork: false
      serviceAccountName: RELEASE-NAME-fluent-bit
      volumes:
      - configMap:
          name: RELEASE-NAME-fluent-bit
        name: config
      - hostPath:
          path: /var/log
        name: varlog
      - hostPath:
          path: /var/lib/docker/containers
        name: varlibdockercontainers
      - hostPath:
          path: /etc/machine-id
          type: File
        name: etcmachineid
