OTEL error as json cannot unmarshal OpenTelemetryCollectorSpec.spec.config of type v1beta1.Config" in RHOCP 4
Issue
-
OpenTelemetry Operator pods is in CrashLoopBackOff with the error:
2024-08-26T18:15:53.317999046Z {"level":"ERROR","timestamp":"2024-08-26T18:15:53.317861696Z","logger":"conversion-webhook","message":"failed to convert","request":"fef05adb-b23d-4f50-8af5-34a0348cc7d3","error":"json: cannot unmarshal string into Go struct field OpenTelemetryCollectorSpec.spec.config of type v1beta1.Config","stacktrace":"sigs.k8s.io/controller-runtime/pkg/webhook/conversion.(*webhook).ServeHTTP\n\t/remote-source/otelop/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.3/pkg/webhook/conversion/conversion.go:74\nsigs.k8s.io/controller-runtime/pkg/webhook/internal/metrics.InstrumentedHook.InstrumentHandlerInFlight.func1\n\t/remote-source/otelop/deps/gomod/pkg/mod/github.com/prometheus/client_golang@v1.19.1/prometheus/promhttp/instrument_server.go:60\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/lib/golang/src/net/http/server.go:2166\ngithub.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerCounter.func1\n\t/remote-source/otelop/deps/gomod/pkg/mod/github.com/prometheus/client_golang@v1.19.1/prometheus/promhttp/instrument_server.go:147\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/lib/golang/src/net/http/server.go:2166\ngithub.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerDuration.func2\n\t/remote-source/otelop/deps/gomod/pkg/mod/github.com/prometheus/client_golang@v1.19.1/prometheus/promhttp/instrument_server.go:109\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/lib/golang/src/net/http/server.go:2166\nnet/http.(*ServeMux).ServeHTTP\n\t/usr/lib/golang/src/net/http/server.go:2683\nnet/http.serverHandler.ServeHTTP\n\t/usr/lib/golang/src/net/http/server.go:3137\nnet/http.(*conn).serve\n\t/usr/lib/golang/src/net/http/server.go:2039"}
-
Not able to edit or delete the
OpenTelemetry
CRotel
with the error:conversion webhook for opentelemetry.io/v1beta1, Kind=OpenTelemetryCollector failed: json: cannot unmarshal string into Go struct field OpenTelemetryCollectorSpec.spec.config of type v1beta1.Config
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 4.14
- Red Hat Build of OpenTelemetry
- 0.102.0-3
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.