Skip to content
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

[bug_fix] Missing resource from OpenShift Routes prevents them to be deployed in OpenShift clusters #1337

Merged
merged 3 commits into from
Jan 10, 2023

Conversation

iblancasa
Copy link
Contributor

After #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

Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
@iblancasa iblancasa requested a review from a team December 22, 2022 09:08
@iblancasa iblancasa changed the title [chorus] Missing resource from OpenShift Routes prevents them to be deployed in OpenShift clusters [chore] Missing resource from OpenShift Routes prevents them to be deployed in OpenShift clusters Dec 22, 2022
Copy link
Member

@frzifus frzifus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @iblancasa , but a changelog is missing. Please run chlog-new and fill the created file. [adding a changelog entry]

Signed-off-by: Israel Blancas <iblancasa@gmail.com>
@iblancasa iblancasa changed the title [chore] Missing resource from OpenShift Routes prevents them to be deployed in OpenShift clusters [bug_fix] Missing resource from OpenShift Routes prevents them to be deployed in OpenShift clusters Dec 22, 2022
@pavolloffay
Copy link
Member

@iblancasa could you please paste here one links/docs for routes/custom-host resource?

@iblancasa
Copy link
Contributor Author

@pavolloffay I was not able to find documentation about this in the OpenShift documentation. When I tried to deploy the CR, the pods were not created. This is all the information I was able to collect from the Internet:

@pavolloffay pavolloffay merged commit 0bdaa9e into open-telemetry:main Jan 10, 2023
@iblancasa iblancasa deleted the fix-routes-openshift branch January 10, 2023 10:21
ItielOlenick pushed a commit to ItielOlenick/opentelemetry-operator that referenced this pull request May 1, 2024
…deployed in OpenShift clusters (open-telemetry#1337)

* Add missing resource for OpenShift routes

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Add missing file

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Add missing changelog file

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants