apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: logretriever
  namespace: logging-system
spec:
  #replicas: 1
  selector:
    matchLabels:
      app: logretriever
  template:
    metadata:
      labels:
        app: logretriever
    spec:
      tolerations:
      - key: node-role.kubernetes.io/master
        effect: NoSchedule
      containers:
      - name: logretriever
        image: jlarriba/logretriever
        resources:
          limits:
            memory: 200Mi
          requests:
            cpu: 100m
            memory: 200Mi
        volumeMounts:
        - name: varlog
          mountPath: /var/log
          readOnly: true
        - name: varlibdockercontainers
          mountPath: /var/lib/docker/containers
          readOnly: true
        - name: optlogs
          mountPath: /opt/logs
      terminationGracePeriodSeconds: 30
      volumes:
      - name: varlog
        hostPath:
          path: /var/log
      - name: varlibdockercontainers
        hostPath:
          path: /var/lib/docker/containers
      - name: optlogs
        persistentVolumeClaim:
          claimName: logretriever
