-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Annotations Filter Added in v0.96.0 does not filter annotations #2770
Comments
@ryanohnemus, can you please try to use the filter parameter like |
@yuriolisa, i've tried both There's also a separate issue if multiple annotations filters are supplied where only the first is checked, which i believe is from here, this should only return match if it matched. Otherwise it returns false when there's not a match but it hasn't checked all filters. That's unfortunately as far as my debugging took me :(. |
I've just checked and there is a real bug regarding the multiple filters not being checked. I will submit a fix this week. |
Thanks @yuriolisa, are you able to reproduce the original issue for this ticket? I have not been able to run the operator even with a single annotation filter and have those annotations filtered on the collector deployment that is created. |
Using a single annotation, I couldn't reproduce the error you mentioned. However, using multiple annotations or labels on the filter parameters, I found a bug there. Therefore, I decided to move from regexp.MatchString to Strings.Contains, which will be simpler to use. |
@jaronoff97 @yuriolisa - this bug still persists in the latest release (0.101.0) even after #2923 I know the test exists here passes: https://github.com/open-telemetry/opentelemetry-operator/blob/main/internal/manifests/manifestutils/annotations_test.go#L162 but when running this in a cluster as described in this ticket, the annotations are still applied to the template and added to the Deployment object for the opentelemetry so the annotations-filter doesn't actually filter anything. Can this be re-opened? |
@ryanohnemus Could you open a new issue following our issue template? It would be helpful to know things like your operator version, CRD versions, operator logs, etc. and I would rather capture that in a new issue. |
Component(s)
collector
What happened?
I am hoping this is possibly just user error, but I attempted to use the annotations-filter added in the v0.96.0 release.
I tested this out using the latest v0.96.0 image and the annotations aren't being filtered out as I'd expect.
I setup a kind cluster using the kind-1.29.yaml included in the repo:
I then edited the
otel-op.yaml
to add the--annotations-filter="config.*.gke.io.*"
arg below for the operator's Deployment:Finally I added an OpenTelemetryCollector resource that has an annotation
configmanagement.gke.io/token
I was expecting filtered out:The
configmanagement.gke.io/token: asdfasdf
is still added to the template for the deployment of the collector and is still added to the pod.Kubernetes Version
1.29.0
Operator version
v0.96.0
Collector version
v0.96.0
Environment information
Environment
kind cluster 1.29 config included with repo
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: