apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: sslsniffer-daemon
  labels:
    app: sslsniffer
spec:
  selector:
    matchLabels:
      app: sslsniffer
  template:
    metadata:
      labels:
        app: sslsniffer
    spec:
      hostPID: true
      # serviceAccountName: sslsniffer-sa ### Needed for EKS
      containers:
        - name: sniffer
          image: appsentinels/sslsniffer:latest
          securityContext:
            privileged: true
            capabilities:
              add:
                - SYS_ADMIN
                - SYS_PTRACE
          env:
            - name: REMOTE_CONTROLLER_SERVER_ENDPOINT
              value: "http://<onprem-controller-ip/hostname>:9004/mergedlog"
            - name: INSTANCE_NAME
              value: "<instance-name>"
          volumeMounts:
            - name: containerd-socket
              mountPath: /var/run/containerd/containerd.sock
            - name: sys-fs
              mountPath: /sys
              readOnly: true
      volumes:
        - name: containerd-socket
          hostPath:
            path: /var/run/containerd/containerd.sock
            type: Socket
        - name: sys-fs
          hostPath:
            path: /sys
            type: Directory
