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

Ingress created to expose the collector is not correct for the HTTP receiver #2449

Open
iblancasa opened this issue Dec 18, 2023 · 1 comment · May be fixed by #2450
Open

Ingress created to expose the collector is not correct for the HTTP receiver #2449

iblancasa opened this issue Dec 18, 2023 · 1 comment · May be fixed by #2450
Labels
bug Something isn't working needs triage

Comments

@iblancasa
Copy link
Contributor

Component(s)

operator

What happened?

The Ingress object created to expose the Collector outside the cluster is not
created properly for the HTTP receiver.

Environment:

  • Kind cluster: 1.24
  • Ingress controller: v1.0.1

When I create this OpenTelemetry Collector instance:

apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
  name: simplest
spec:
  mode: "deployment"
  ingress:
    type: ingress
  config: |
    receivers:
      otlp:
        protocols:
          grpc:
          http:
    exporters:
      debug:

    service:
      pipelines:
        traces:
          receivers: [otlp]
          processors: []
          exporters: [debug]

This is the created Ingress instance:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  creationTimestamp: "2023-12-18T11:04:39Z"
  generation: 1
  labels:
    app.kubernetes.io/instance: demo.simplest
    app.kubernetes.io/managed-by: opentelemetry-operator
    app.kubernetes.io/name: simplest-ingress
  name: simplest-ingress
  namespace: demo
  ownerReferences:
  - apiVersion: opentelemetry.io/v1alpha1
    blockOwnerDeletion: true
    controller: true
    kind: OpenTelemetryCollector
    name: simplest
    uid: 540cf5f8-29ec-4d8e-94b5-cf89749e8c9e
  resourceVersion: "1038"
  uid: 6d2f105f-8d56-4967-86db-e8c62f291cd3
spec:
  rules:
  - http:
      paths:
      - backend:
          service:
            name: simplest-collector
            port:
              name: otlp-grpc
        path: /otlp-grpc
        pathType: Prefix
      - backend:
          service:
            name: simplest-collector
            port:
              name: otlp-http
        path: /otlp-http
        pathType: Prefix
status:
  loadBalancer: {}

If I run curl to the exposed URL:

$ curl http://localhost/otlp-http/v1/traces
404 page not found

If I try to send traces from a Python application, I can see this error message:

Failed to export batch code: 404, reason: 404 page not found

If I do port forwarding to the 4318 port, and run curl for the same subpath:

$ curl http://localhost:4318/v1/traces
405 method not allowed, supported: [POST]

Kubernetes Version

1.24

Operator version

c8b2970

Collector version

0.90.0

Environment information

No response

Log output

No response

Additional context

No response

@iblancasa iblancasa added bug Something isn't working needs triage labels Dec 18, 2023
@iblancasa iblancasa linked a pull request Dec 18, 2023 that will close this issue
@Starefossen
Copy link
Contributor

Facing the same issue. Ingress does not work at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants