traefik icon indicating copy to clipboard operation
traefik copied to clipboard

Fix ingress status if type ClusterIP

Open walnuss0815 opened this issue 2 months ago • 3 comments

What does this PR do?

This PR fixes the Kubernetes ingress status if the traefik service is type ClusterIP. The field .spec.clusterIPs is now being used to generate the ingress status instead of the ExternalIPs. ExternalIPs is for IPs "for which nodes in the cluster will also accept traffic for this service".

Ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#servicespec-v1-core

Motivation

I am having the same issue as described here https://github.com/argoproj/argo-cd/issues/14607 which should be fixed by https://github.com/traefik/traefik/pull/11100 , but due to the usage of the externalIPs field it does not work as intended if the service type is ClusterIP.

More

  • [x] Added/updated tests
  • [x] Added/updated documentation

Additional Notes

walnuss0815 avatar Oct 07 '25 11:10 walnuss0815

I have built the image and tested it in my Kubernetes cluster. It works like expected and without an issues.

walnuss0815 avatar Oct 07 '25 11:10 walnuss0815

Hello @walnuss0815,

Thank you for your contribution.

Your PR looks more like a fix. Could you rebase it on the v3.5 branch please?

We've set the status to "design-review" to allow us to check the PR and ensure there is no deep impact on Traefik before moving forward.

We'll keep you updated once the analysis is done.

nmengin avatar Oct 09 '25 12:10 nmengin

Hi @nmengin,

I have rebased the fix on the v3.5 branch.

walnuss0815 avatar Oct 09 '25 12:10 walnuss0815