-
Bug
-
Resolution: Done-Errata
-
Undefined
-
None
-
None
Description of the problem:
When a OpenTelemetry Collector deployment is created with OpenTelemetryCollector.spec.ingress type set to route, the route fails to create with the following error in the opentelemetry-operator-controller-manager
{"level":"error","ts":"2023-05-30T06:32:46.053454627Z","logger":"controllers.OpenTelemetryCollector","msg":"failed to reconcile routes","error":"failed to reconcile the expected routes: failed to create: Route.route.openshift.io \"otlp-grpc-cluster-collector-route\" is invalid: [spec.host: Invalid value: \"otlp-grpc.\": host must conform to DNS 952 subdomain conventions, spec.host: Invalid value: \"otlp-grpc.\": a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')]","stacktrace":"github.com/open-telemetry/opentelemetry-operator/controllers.(*OpenTelemetryCollectorReconciler).RunTasks\n\t/remote-source/otelop/app/controllers/opentelemetrycollector_controller.go:229\ngithub.com/open-telemetry/opentelemetry-operator/controllers.(*OpenTelemetryCollectorReconciler).Reconcile\n\t/remote-source/otelop/app/controllers/opentelemetrycollector_controller.go:211\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/remote-source/otelop/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.5/pkg/internal/controller/controller.go:122\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/remote-source/otelop/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.5/pkg/internal/controller/controller.go:323\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/remote-source/otelop/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.5/pkg/internal/controller/controller.go:274\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/remote-source/otelop/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.5/pkg/internal/controller/controller.go:235"} {"level":"error","ts":"2023-05-30T06:32:46.053567265Z","msg":"Reconciler error","controller":"opentelemetrycollector","controllerGroup":"opentelemetry.io","controllerKind":"OpenTelemetryCollector","OpenTelemetryCollector":\{"name":"cluster-collector","namespace":"tracing-system"} ,"namespace":"tracing-system","name":"cluster-collector","reconcileID":"5bcf8c1e-b92f-4b59-a79a-90ec13ef67d1","error":"failed to reconcile the expected routes: failed to create: Route.route.openshift.io \"otlp-grpc-cluster-collector-route\" is invalid: [spec.host: Invalid value: \"otlp-grpc.\": host must conform to DNS 952 subdomain conventions, spec.host: Invalid value: \"otlp-grpc.\": a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')]","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/remote-source/otelop/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.5/pkg/internal/controller/controller.go:329\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/remote-source/otelop/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.5/pkg/internal/controller/controller.go:274\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/remote-source/otelop/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.5/pkg/internal/controller/controller.go:235"}
Version of components:
opentelemetry-operator.v0.74.0-5
jaeger-operator.v1.42.0-5
OCP Server Version: 4.14.0-0.nightly-2023-05-29-174116
Cluster type - IPI on GCP
How Reproducible:
Always
Steps to reproduce the issue:
*Install the Distributed Tracing Platform and Data Collection operators.
*Create a OpenTelemetry collector with the below CR.
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
name: cluster-collector
namespace: tracing-system
spec:
config: |
receivers:
otlp:
protocols:
grpc:
http:
processors:
exporters:
jaeger:
endpoint: jaeger-production-collector-headless.tracing-system.svc:14250
tls:
ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt"
service:
pipelines:
traces:
receivers: [otlp]
processors: []
exporters: [jaeger]
mode: deployment
ingress:
type: route
route:
termination: edge
*Check the OpenTelemetry controller manager logs.
oc -n openshift-operators logs opentelemetry-operator-controller-manager-6cb99488f5-lx2lp {"level":"error","ts":"2023-05-30T06:54:16.382394459Z","logger":"controllers.OpenTelemetryCollector","msg":"failed to reconcile routes","error":"failed to reconcile the expected routes: failed to create: Route.route.openshift.io \"otlp-grpc-cluster-collector-route\" is invalid: [spec.host: Invalid value: \"otlp-grpc.\": host must conform to DNS 952 subdomain conventions, spec.host: Invalid value: \"otlp-grpc.\": a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')]","stacktrace":"github.com/open-telemetry/opentelemetry-operator/controllers.(*OpenTelemetryCollectorReconciler).RunTasks\n\t/remote-source/otelop/app/controllers/opentelemetrycollector_controller.go:229\ngithub.com/open-telemetry/opentelemetry-operator/controllers.(*OpenTelemetryCollectorReconciler).Reconcile\n\t/remote-source/otelop/app/controllers/opentelemetrycollector_controller.go:211\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/remote-source/otelop/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.5/pkg/internal/controller/controller.go:122\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/remote-source/otelop/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.5/pkg/internal/controller/controller.go:323\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/remote-source/otelop/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.5/pkg/internal/controller/controller.go:274\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/remote-source/otelop/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.5/pkg/internal/controller/controller.go:235"} {"level":"error","ts":"2023-05-30T06:54:16.382516241Z","msg":"Reconciler error","controller":"opentelemetrycollector","controllerGroup":"opentelemetry.io","controllerKind":"OpenTelemetryCollector","OpenTelemetryCollector":\{"name":"cluster-collector","namespace":"tracing-system"} ,"namespace":"tracing-system","name":"cluster-collector","reconcileID":"f70b346a-f0e4-4f19-b6f4-a12d385448ad","error":"failed to reconcile the expected routes: failed to create: Route.route.openshift.io \"otlp-grpc-cluster-collector-route\" is invalid: [spec.host: Invalid value: \"otlp-grpc.\": host must conform to DNS 952 subdomain conventions, spec.host: Invalid value: \"otlp-grpc.\": a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')]","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/remote-source/otelop/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.5/pkg/internal/controller/controller.go:329\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/remote-source/otelop/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.5/pkg/internal/controller/controller.go:274\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/remote-source/otelop/deps/gomod/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.5/pkg/internal/controller/controller.go:235"}
- links to
-
RHBA-2023:121974 Red Hat OpenShift distributed tracing 3.0.0 operator/operand containers