Uploaded image for project: 'Distributed Tracing'
  1. Distributed Tracing
  2. TRACING-2943

OpenShift Routes created by the OTEL Collector Operator don't work on OpenShift clusters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • None
    • None
    • False
    • None
    • False
    • Important

      After PR 1206, OpenShift routes are supported by the OpenTelemetry Collector Operator.

      In upstream, this works because we're installing the OpenShift Routes CRD in the Kubernetes cluster. But, for OpenShift, the creation of routes don't work.

      How to reproduce

      When this manifest is deployed:

      apiVersion: opentelemetry.io/v1alpha1
      kind: OpenTelemetryCollector
      metadata:
        name: simplest
      spec:
        mode: "deployment"
        ingress:
          type: route
          hostname: "example.com"
          annotations:
            something.com: "true"
          route:
            termination: "insecure"
      
        config: |
          receivers:
            otlp:
              protocols:
                grpc:
      
          exporters:
            logging:
      
          service:
            pipelines:
              traces:
                receivers: [otlp]
                processors: []
                exporters: [logging]
      

      This error is logged in the OTEL Collector Operator:

      {"level":"error","ts":"2022-12-21T16:32:48.213626Z","msg":"Reconciler error","controller":"opentelemetrycollector","controllerGroup":"opentelemetry.io","controllerKind":"OpenTelemetryCollector","OpenTelemetryCollector":{"name":"simplest","namespace":"israel"},"namespace":"israel","name":"simplest","reconcileID":"83890790-0c84-49de-ace1-9c0c305e8d51","error":"failed to reconcile the expected routes: failed to create: Route.route.openshift.io \"otlp-grpc-simplest-route\" is invalid: spec.host: Forbidden: you do not have permission to set the host field of the route","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/internal/controller/controller.go:326\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/internal/controller/controller.go:273\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.1/pkg/internal/controller/controller.go:234"}
      

      And the Collector nor the Route are created.

      Environment

      OCP version: 4.11
      Branch: main
      Commit: 06503f9eb1ff8dcaddcbb13c97a3fe9d5a7fbb18

            rhn-support-iblancas Israel Blancas Alvarez
            rhn-support-iblancas Israel Blancas Alvarez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: