What's New in OpenTelemetry Operator v0.165.0
Patch release fixing collector port-name races, webhook rejections, TargetAllocator PDB/annotations, and auto-instrumentation mount bugs.
💡 Quick Answer: OpenTelemetry Operator v0.165.0 is a bug-fix-only release: it fixes a port-naming data race in the collector reconciler, a TargetAllocator PDB/annotations-filter gap, an OpAMP Bridge TLS regression, and an auto-instrumentation mount bug for Nginx/Apache Httpd. No new CRD fields, no breaking changes — safe to roll out as a routine patch upgrade.
The Problem
Operators running v0.164.0 (or earlier) may hit any of these symptoms:
- Collector Services occasionally get the wrong port name on one of the multi-protocol receivers (otlp, jaeger, loki) because concurrent reconciles raced on a shared string buffer (#5989).
- Collectors with receiver names containing uppercase letters, dots, or consecutive hyphens (e.g.
otlp/A,statsd/v1.2) get rejected by the validating webhook because the generated port name isn’t a valid Kubernetes port name (#5808). TargetAllocator.spec.annotationsFilter(or the equivalent field on anOpenTelemetryCollector-generated TargetAllocator) is ignored (#5996), and no PodDisruptionBudget is created by default when usingperNodeallocation strategy (#5974).- The standalone OpAMP Bridge drops TLS configuration on reconnect (#6006).
- Auto-instrumentation injection for Nginx/Apache Httpd relocates app volume mounts that merely contain the config path as a substring (e.g.
/opt/app-root/etc/nginx/conf.d), moving them into the clone init container when they shouldn’t be touched (#2846).
The Solution
Upgrade the operator to v0.165.0. All fixes listed above are server-side (controller/webhook/init-container logic) — no manifest or CRD migration is required, and existing OpenTelemetryCollector / Instrumentation / TargetAllocator CRs do not need edits.
What’s New
All changes in this release are bug fixes (no new features/flags):
collector: Fixed a data race in the multi-protocol receiver port parser (otlp, jaeger, loki, etc.) that could assign the wrong port name to a Service when multiple collectors reconcile concurrently. Each parser now works on a copy instead of a shared default. (#5989)collector: Receiver/exporter names that previously produced invalid Kubernetes port names (uppercase letters, dots, consecutive hyphens — e.g.otlp/A,statsd/v1.2) now fall back to aport-<number>name instead of failing webhook validation. (#5808)auto-instrumentation: Volume mounts that only contain the Nginx/Apache Httpd config path as a substring (not the config dir itself or a path below it) are no longer moved into the clone init container. (#2846)opamp: TLS settings are now preserved for connections made by the standalone OpAMP Bridge. (#6006)target allocator:--annotations-filteris now correctly applied to the TargetAllocator generated from anOpenTelemetryCollectorspec. (#5996)target allocator: A defaultPodDisruptionBudgetis now created for the TargetAllocator when using the per-node allocation strategy. (#5974)
Component versions bundled
- OpenTelemetry Collector / Contrib: v0.165.0
- Java auto-instrumentation: v2.34.0-1
- .NET auto-instrumentation: v1.20.0-1
- Node.js: v0.83.1-2
- Python: v0.66b3-1
- Ruby: v0.1.0
- Go: v0.24.0
- PHP ext: 1.5.0
- Apache Httpd / Nginx webserver modules: 1.0.4-5
Upgrade Steps
Helm
helm repo update open-telemetry
helm show chart open-telemetry/opentelemetry-operator | grep appVersion
helm upgrade opentelemetry-operator open-telemetry/opentelemetry-operator \
--namespace opentelemetry-operator-system \
--reuse-values \
--set manager.image.tag=0.165.0Raw manifest (kubectl)
kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/download/v0.165.0/opentelemetry-operator.yamlIf you pin the image explicitly:
kubectl -n opentelemetry-operator-system set image \
deployment/opentelemetry-operator-controller-manager \
manager=ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.165.0Verify
# Confirm the controller pod is running the new image
kubectl -n opentelemetry-operator-system get deployment opentelemetry-operator-controller-manager \
-o jsonpath='{.spec.template.spec.containers[?(@.name=="manager")].image}'
# Confirm rollout completed
kubectl -n opentelemetry-operator-system rollout status deployment/opentelemetry-operator-controller-manager
# Spot-check that collectors with odd receiver names now get a valid port
kubectl get svc -n <collector-namespace> <collector-service-name> -o jsonpath='{.spec.ports[*].name}'
# If you use per-node TargetAllocator, confirm a PDB now exists
kubectl get pdb -n <ta-namespace> -l app.kubernetes.io/component=opentelemetry-targetallocatorCommon Issues
- Webhook still rejects an old CR after upgrade: the fix for #5808 applies on the next reconcile; trigger it with a no-op edit (
kubectl annotate opentelemetrycollector <name> kubernetes.io/change-cause="bump-0.165.0" --overwrite -n <ns>) if the Service port name looks stale. - Existing TargetAllocator PDB conflicts: if you already manage a PDB for TargetAllocator manually, the new default PDB (#5974) may collide — check for duplicate PDB objects after upgrade and remove your manual one, or set
targetAllocator.podDisruptionBudgetexplicitly in the CR to override. - Auto-instrumentation sidecar behavior changed slightly: #2846 only affects pods where the app volume mount path is a substring match of the Nginx/Apache config dir; re-test custom Nginx/Apache instrumentation configs that rely on nonstandard mount paths.
Best Practices
- Treat this as a routine patch upgrade — no CRD version bump, so it’s safe for standard GitOps rollout pipelines.
- Re-run
kubectl get otelcol -A -o yaml | kubectl apply --dry-run=server -f -(or your webhook validation step) after upgrading if you previously worked around the #5808 port-name issue with manual naming conventions. - Watch collector Service port names for a reconcile cycle after upgrade in multi-collector clusters, since #5989 was specifically a concurrency bug that only showed up under load.
- Full changelog and bundled component matrix: https://github.com/open-telemetry/opentelemetry-operator/releases/tag/v0.165.0
Book by Grzegorz Stencel & Luca Berton
Kubernetes Recipes
- Paperback · eBook
- Apress
- 750 pages
100+ production-ready patterns with detailed explanations, best practices, and copy-paste YAML. Everything in one place.
Book by Grzegorz Stencel & Luca Berton
Kubernetes Recipes
- Paperback · eBook
- Apress
- 750 pages
This recipe is from Kubernetes Recipes, our 750-page practical guide with hundreds of production-ready patterns.
