jaeger-operator
jaeger-operator copied to clipboard
[Bug]: Ingress jaeger-query should use the default IngressClass if one is not provided
What happened?
When I deploy jaeger the operator also createas an Ingress 'jaeger-query'. Although my kubernes IngressClass is configured as default (there is only one Ingress in my setup) and I also set it to watch for Ingress deployments without an IngressClass, the jaeger Ingress always has an IngressClass of '
When I delete the Ingress and recreate it, it has the default IngressClass 'nginx'. But after a while, it is overwritten with '
Steps to reproduce
- Prepare a kubernetes Cluster. Mine runs 1.27
- Install Ingress, like so:
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm upgrade --install ingress-nginx ingress-nginx/ingress-nginx --set watchIngressWithoutClass=true --set controller.ingressClassResource.default=true --namespace ingress-nginx --create-namespace
- Install Jaeger, follow the documentation at https://www.jaegertracing.io/docs/1.18/operator/. The 'AllInOne' Setup should be fine, though I use the production strategey.
- Check the jaeger-query is there. It should have an IngressClass of 'nginx'.
- Wait an hour or so....check again. Now it should how an IngressClass of '
'. - Save the Ingress to to a yaml file:
kubectl get ingress jaeger-query -o yaml > /tmp/ingerss.yaml
- Create the Ingress again:
kubectl replace -f /tmp/ingress.yaml --force
- Repeat Steps 4 and 5
Expected behavior
Ingress jaeger-query should always have a default IngressClass 'nginx'.
Relevant log output
No response
Screenshot
No response
Additional context
No response
Jaeger backend version
v1.44.0
SDK
No response
Pipeline
No response
Stogage backend
Open-Search
Operating system
Linux, Debian 11
Deployment model
Kubernetes
Deployment configs
No response
@Jeansen could you provide the CR used to create your Jaeger instance?
If you check how the Jaeger Operator works, it will set the IngressClass only if you provided one to the Jaeger .spec.ingress.ingressclassname
: https://github.com/jaegertracing/jaeger-operator/blob/76b16a32ff2c692633ebfc65e29b686e924ea1cf/pkg/ingress/query.go#L54
If you modify the Ingress created by the Jaeger Operator, it will be reconciled and your changes overwritten.
PASSWORD=${'$'}(kubectl get -n $ns secret ${clusterName}-admin-password -o=jsonpath="{.data.password}" | base64 --decode)
USERNAME=${'$'}(kubectl get -n $ns secret ${clusterName}-admin-password -o=jsonpath="{.data.username}" | base64 --decode)
kubectl -n $ns create -f https://github.com/jaegertracing/jaeger-operator/releases/download/$version/jaeger-operator.yaml
kubectl -n $ns create secret generic jaeger-secret --from-literal=ES_PASSWORD=${'$'}{PASSWORD} --from-literal=ES_USERNAME=${'$'}USERNAME
cat <<EOF | kubectl apply --force -f -
apiVersion: jaegertracing.io/v1
kind: Jaeger
metadata:
name: jaeger
namespace: $ns
spec:
collector:
autoscale: false
strategy: production
agent:
strategy: DaemonSet
storage:
type: elasticsearch
options:
log-level: debug
query:
base-path: /jaeger
es:
server-urls: https://${clusterName}.${ns}:9200
tls:
ca: /es/certificates/ca.crt
secretName: jaeger-secret
volumeMounts:
- name: certificates
mountPath: /es/certificates/
readOnly: true
volumes:
- name: certificates
secret:
secretName: ${clusterName}-http-cert
If you modify the Ingress created by the Jaeger Operator, it will be reconciled and your changes overwritten.
@iblancasa Well, that's exactly the point. I did not specify an IngressClass and therefore expect the cluster default to be used.
@Jeansen ok, now I understand. Please, could you modify the title of the issue to Ingress jaeger-query should use the default IngressClass if one is not provided
? I can take a look into that and try to send a PR
@iblancasa Of course. And thank you for all the help. Looking forward to that PR.
Hi @iblancasa , Can I pick this issue? Please assign this to me.
Hi @iblancasa , I am trying to reproduce this issue but I am not able to install the jaeger crds as per the docs of 1.18 version mentioned in the issue. https://www.jaegertracing.io/docs/1.18/operator/
In the above link the following command is being failed: [kubectl create -f https://raw.githubusercontent.com/jaegertracing/jaeger-operator/main/deploy/crds/jaegertracing.io_jaegers_crd.yaml](kubectl create -f https://raw.githubusercontent.com/jaegertracing/jaeger-operator/main/deploy/crds/jaegertracing.io_jaegers_crd.yaml) As the file it is applying does not exist in the above location. Could you please let me know that which version of jaeger-operator I should install to reproduce this issue?
@iblancasa Also Could you please let me know which tool you use for community wide communication like slack, telegram or Team etc.? And if possible add me there so that in your absents someone else can reply to my query for faster resolution.
Hi @iblancasa , I am trying to reproduce this issue but I am not able to install the jaeger crds as per the docs of 1.18 version mentioned in the issue. https://www.jaegertracing.io/docs/1.18/operator/
In the above link the following command is being failed: [kubectl create -f https://raw.githubusercontent.com/jaegertracing/jaeger-operator/main/deploy/crds/jaegertracing.io_jaegers_crd.yaml](kubectl create -f https://raw.githubusercontent.com/jaegertracing/jaeger-operator/main/deploy/crds/jaegertracing.io_jaegers_crd.yaml) As the file it is applying does not exist in the above location. Could you please let me know that which version of jaeger-operator I should install to reproduce this issue?
I didn't reproduce it. Try installing the latest version.
@iblancasa Also Could you please let me know which tool you use for community wide communication like slack, telegram or Team etc.? And if possible add me there so that in your absents someone else can reply to my query for faster resolution.
CNCF Slack channel.
created a pull request addressing this #2458