jaeger-operator
jaeger-operator copied to clipboard
[Bug]: On Openshift, jaeger-operator does not respect hosts set in ingress section
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
cc) @rubenvp8510 @iblancasa
https://github.com/jaegertracing/jaeger-operator/blob/cb33f0a7685a6596c1ead92a01e5d15041537596/apis/v1/jaeger_types.go#L310
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 can you check if the changes done in https://github.com/jaegertracing/jaeger-operator/pull/2409 solve your problem?
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 :)