jaeger-operator icon indicating copy to clipboard operation
jaeger-operator copied to clipboard

[Bug]: On Openshift, jaeger-operator does not respect hosts set in ingress section

Open xmj opened this issue 1 year ago • 4 comments

What happened?

According the Jaeger CRD, and the PR merged in https://github.com/jaegertracing/jaeger-operator/pull/749 it should be possible to set dynamic hostnames for the ingress resource.

On openshift, this is not the case: the hostname of the route is always a composite of the jaeger instance name and the namespace it is deployed into.

See https://github.com/jaegertracing/jaeger-operator/blob/main/pkg/route/query.go#L48

Could you please enhance jaeger-operator to respect the hosts: / tls[].hosts lists?

Thank you!

Steps to reproduce

Deploy jaeger operator and configure instance like so:

apiVersion: jaegertracing.io/v1
kind: Jaeger
metadata:
  labels:
    jaegertracing.io/operated-by: openshift-distributed-tracing.jaeger-operator
  name: jaeger
  namespace: openshift-distributed-tracing
spec:
<snip>
  strategy: production
<snip>
  ingress:
    hosts:
      - {{ .Values.jaeger.hostname }}
    tls:
      - hosts:
          - {{ .Values.jaeger.hostname }}
        secretName: jaeger-jaeger-elasticsearch
    openshift:
        {"namespace": "openshift-distributed-tracing", "resource": "pods",
        "verb": "get"}
    options: {}
    resources: {}
    security: oauth-proxy
<snip>

You can use any FQDN instead of {{ .Values.jaeger.hostname }}, as per the route/query.go configuration it will be ignored anyway.

Expected behavior

Ingress route is created with FQDN specified in the ingress.hosts / ingress.tls.hosts values.

Relevant log output

No response

Screenshot

No response

Additional context

No response

Jaeger backend version

v1.47.0-2 (RH/Openshift edition)

SDK

No response

Pipeline

No response

Stogage backend

ElasticSearch

Operating system

Openshift / RHEL

Deployment model

k8s

Deployment configs

No response

xmj avatar Sep 28 '23 13:09 xmj

cc) @rubenvp8510 @iblancasa

https://github.com/jaegertracing/jaeger-operator/blob/cb33f0a7685a6596c1ead92a01e5d15041537596/apis/v1/jaeger_types.go#L310

pavolloffay avatar Oct 03 '23 12:10 pavolloffay

cc) @rubenvp8510 @iblancasa

https://github.com/jaegertracing/jaeger-operator/blob/cb33f0a7685a6596c1ead92a01e5d15041537596/apis/v1/jaeger_types.go#L310

Is there anything I can do to help move this ticket forward?

xmj avatar Jan 05 '24 08:01 xmj

@xmj can you check if the changes done in https://github.com/jaegertracing/jaeger-operator/pull/2409 solve your problem?

iblancasa avatar Jan 05 '24 14:01 iblancasa

Thanks for the PR @iblancasa, looks good. I'm not sure how to replace openshift's jaeger deployment with a custom-built one from this PR yet. Once I do, I'll let you know :)

xmj avatar Jan 09 '24 08:01 xmj