apiVersion: apps/v1
kind: DaemonSet
metadata:
  labels:
    app.kubernetes.io/component: observability
    app.kubernetes.io/instance: parca-agent
    app.kubernetes.io/name: parca-agent
    app.kubernetes.io/version: v0.7.0
  name: parca-agent
  namespace: parca
spec:
  selector:
    matchLabels:
      app.kubernetes.io/component: observability
      app.kubernetes.io/instance: parca-agent
      app.kubernetes.io/name: parca-agent
  template:
    metadata:
      labels:
        app.kubernetes.io/component: observability
        app.kubernetes.io/instance: parca-agent
        app.kubernetes.io/name: parca-agent
        app.kubernetes.io/version: v0.7.0
    spec:
      containers:
      - args:
        - /bin/parca-agent
        - --log-level=debug
        - --node=$(NODE_NAME)
        - --kubernetes
        - --store-address=parca.parca.svc.cluster.local:7070
        - --insecure
        - --insecure-skip-verify
        - --temp-dir=tmp
        env:
        - name: NODE_NAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
        image: ghcr.io/parca-dev/parca-agent:v0.7.0
        name: parca-agent
        ports:
        - containerPort: 7071
          hostPort: 7071
          name: http
        resources: {}
        securityContext:
          privileged: true
          readOnlyRootFilesystem: true
        volumeMounts:
        - mountPath: /tmp
          name: tmp
        - mountPath: /run
          name: run
        - mountPath: /lib/modules
          name: modules
        - mountPath: /sys/kernel/debug
          name: debugfs
        - mountPath: /sys/fs/cgroup
          name: cgroup
        - mountPath: /sys/fs/bpf
          name: bpffs
      hostPID: true
      nodeSelector:
        kubernetes.io/arch: amd64
        kubernetes.io/os: linux
      serviceAccountName: parca-agent
      tolerations:
      - effect: NoSchedule
        operator: Exists
      - effect: NoExecute
        operator: Exists
      volumes:
      - emptyDir: {}
        name: tmp
      - hostPath:
          path: /run
        name: run
      - hostPath:
          path: /sys/fs/cgroup
        name: cgroup
      - hostPath:
          path: /lib/modules
        name: modules
      - hostPath:
          path: /sys/fs/bpf
        name: bpffs
      - hostPath:
          path: /sys/kernel/debug
        name: debugfs
