github.com/inspektor-gadget/inspektor-gadget@v0.28.1/docs/examples/ds-ig.yaml (about)

     1  # This manifest is a template for running the ig binary as a daemon set. For simplicity, we use a
     2  # privileged pod, but you can use a more restrictive setup. Check
     3  # charts/gadget/templates/daemonset.yaml that is our source of true for the security configuration
     4  # needed by Inspektor Gadget.
     5  apiVersion: apps/v1
     6  kind: DaemonSet
     7  metadata:
     8    name: ig
     9    labels:
    10      k8s-app: example-ig
    11  spec:
    12    selector:
    13      matchLabels:
    14        name: example-ig
    15    template:
    16      metadata:
    17        labels:
    18          name: example-ig
    19      spec:
    20        containers:
    21        - name: ig
    22          # CHANGEME: use your own image
    23          image: mycontainerimage:latest
    24          securityContext:
    25            # CHANGEME: see comment at the top of this file
    26            privileged: true
    27          # CHANGEME: replace this with your own commands
    28          command:
    29          - "/bin/sh"
    30          - "-c"
    31          - "sleep inf"
    32          env:
    33          - name: HOST_ROOT
    34            value: "/host"
    35          volumeMounts:
    36            - mountPath: /host
    37              name: host
    38            - mountPath: /run
    39              name: run
    40            - mountPath: /sys/kernel/debug
    41              name: debugfs
    42        nodeSelector:
    43          kubernetes.io/os: linux
    44        volumes:
    45          - name: host
    46            hostPath:
    47              path: /
    48          - name: run
    49            hostPath:
    50              path: /run
    51          - name: debugfs
    52            hostPath:
    53              path: /sys/kernel/debug