apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: fluentd
  labels:
    app: fluentd
    version: v1
spec:
  selector:
    matchLabels:
      app: fluentd
      version: v1
  updateStrategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 100
  template:
    metadata:
      name: fluentd
      labels:
        app: fluentd
        version: v1
    spec:
      hostNetwork: true
      serviceAccountName: fluentd
      #tolerations:
      #- key: node-role.kubernetes.io/master
      #  effect: NoSchedule
      containers:
      - name: fluentd
        image: fluent/fluentd-kubernetes-daemonset:v1.4-debian-forward-1
        resources:
          limits:
            memory: 200Mi
          requests:
            cpu: 100m
            memory: 200Mi
        ports:
          - containerPort: 24231
            name: web
        volumeMounts:
        - mountPath: /fluentd/etc/
          name: fconf

        - name: varlog
          mountPath: /var/log
        - name: varlibdockercontainers
          mountPath: /var/lib/docker/containers
          readOnly: true
        - name: varlibdockercontainers
          mountPath: /home/docker/containers
          readOnly: true
      terminationGracePeriodSeconds: 1
      volumes:
      - name: fconf
        configMap:
          name: fconf
      - name: varlog
        hostPath:
          path: /var/log
      - name: varlibdockercontainers
        hostPath:
          path: /var/lib/docker/containers
     # Moved /var/lib/docker/
      - name: homedockercontainers
        hostPath:
          path: /home/docker/containers