microsoft / retina

eBPF distributed networking observability tool for Kubernetes
https://retina.sh
MIT License
2.52k stars 172 forks source link

enableAnnotations flag not working instead all pods are instrumented #508

Open VincentS opened 1 week ago

VincentS commented 1 week ago

Describe the bug Despite setting the enableAnnotations flag in Helm metrics of all pods on the cluster are collected even when they do not have the annotation retina.sh: observe.

Also its not clear which label is the right one the retina.sh: observe mentioned here https://github.com/microsoft/retina/blob/main/docs/metrics/annotations.md or retina.sh/v1alpha=observe mentioned here https://github.com/microsoft/retina/blob/main/docs/installation/config.md.

The documentation is inconsistent regarding the required annotation.

To Reproduce Steps to reproduce the behaviour:

  1. Configure Helm Deployment with Operator and agent enabled
  2. Helm Config:

          operator:
            enabled: true
            installCRDs: true
            enableRetinaEndpoint: true
    
          enablePodLevel: true
          remoteContext: true
          enableAnnotations: true
          bypassLookupIPOfInterest: false
    
          enabledPlugin_linux: '["dropreason","packetforward","linuxutil","dns","packetparser","tcpretrans"]'
    
          enableTelemetry: false

    I shortened the Helm config and only left the (hopefully) relevant feature flags to reproduce the issues. I can also provide a full Helm values.yam if needed.

Expected behavior Only metrics from Pods in kube-system and from namespace / pods annotated with the annotation mentioned above are collected.

Platform (please complete the following information):