  apiVersion: "apps/v1"
  kind: "DaemonSet"
  metadata: 
    name: "kube-iptables-tailer"
    namespace: "kube-system"
  spec:
    selector:
      matchLabels:
        app: "kube-iptables-tailer" 
    template:
      metadata:
        labels:
          app: "kube-iptables-tailer"
      spec: 
        serviceAccountName: kube-iptables-tailer
        containers: 
          - name: "kube-iptables-tailer"
            command:
              - "/kube-iptables-tailer"
              - "--log_dir=/my-service-logs" # change the output directory of service logs
              - "--v=4" # enable V-leveled logging at this level
            env: 
              - name: "JOURNAL_DIRECTORY"
                value: "/var/log/journal"
              - name: "POD_IDENTIFIER"
                value: "label"
              - name: "POD_IDENTIFIER_LABEL"
                value: "netperf-type"
              - name: "IPTABLES_LOG_PREFIX"
                # log prefix defined in your iptables chains
                value: "calico-packet:"
            image: "virtualshuric/kube-iptables-tailer:8d4296a"
            imagePullPolicy: Always
            volumeMounts: 
              - name: "iptables-logs"
                mountPath: "/var/log/"
                readOnly: true
              - name: "service-logs"
                mountPath: "/my-service-logs"

        volumes:
          - name: "iptables-logs"
            hostPath: 
              # absolute path of the directory containing iptables log file on your host
              path: "/var/log"
          - name: "service-logs"
            emptyDir: {}
