enableAnnotations flag not working instead all pods are instrumented
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:
- Configure Helm Deployment with Operator and agent enabled
- 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):
- OS: AzureLinux
- Kubernetes Version: 1.27
- Host: AKS
- Retina Version: 0.0.12