traefik icon indicating copy to clipboard operation
traefik copied to clipboard

feat: Add ingress status for ClusterIP and NodePort Service Type.

Open mlec1 opened this issue 1 year ago • 3 comments

What does this PR do?

This pull request adds ingress status for ClusterIP and NodePort Service Type.

I modified a little bit but took

Refs: traefik/traefik#7972

Motivation

It is pretty useful for deployment with ArgoCD for example which check the health by checking the status of an Ingress for its health checks.

I modified a little bit but took the main code from the ticket below

See: Refs: traefik/traefik#7972

More

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

Additional Notes

I have tested it on my own cluster and it worked.

mlec1 avatar Sep 18 '24 16:09 mlec1

first of all, huge thanks for submitting this!

I have a small concern but I'm not sure if it will even be a problem: What happens when people use a NodePort service, but with an external LoadBalancer pointed to some, but not all of the nodes' external IPs? Could this cause problems since the list of node IPs is technically wrong?

Again, no idea if this is even a realistic problem, and I'm not trying to hold this up in any way - it just came to mind while thinking about a setup I'm currently tinkering with where argocd is acting up. I think this PR could help with that

Finally, ref: https://github.com/argoproj/argo-cd/issues/14607

jemand771 avatar Sep 23 '24 23:09 jemand771

first of all, huge thanks for submitting this!

I have a small concern but I'm not sure if it will even be a problem: What happens when people use a NodePort service, but with an external LoadBalancer pointed to some, but not all of the nodes' external IPs? Could this cause problems since the list of node IPs is technically wrong?

Again, no idea if this is even a realistic problem, and I'm not trying to hold this up in any way - it just came to mind while thinking about a setup I'm currently tinkering with where argocd is acting up. I think this PR could help with that

Finally, ref: argoproj/argo-cd#14607

Concerning ArgoCD, for the health of Ingress, it expects just something so it won't be an issue here: https://argo-cd.readthedocs.io/en/stable/operator-manual/health/#ingress

According to the doc: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport,

"Every node in the cluster configures itself to listen on that assigned port and to forward traffic to one of the ready endpoints associated with that Service. You'll be able to contact the type: NodePort Service, from outside the cluster, by connecting to any node using the appropriate protocol (for example: TCP), and the appropriate port (as assigned to that Service)."

So in fact all nodes listen, then it is your choice to use only some of them. (that's what I understand, feel free to correct me if I am wrong).

mlec1 avatar Sep 24 '24 18:09 mlec1

ah, yeah, that sounds reasonable. looks like my idea really was just a very hypothetical (if not impossible) scenario that doesn't matter for argocd either way. thanks for clarifying :)

jemand771 avatar Sep 24 '24 19:09 jemand771

Hey, thanks for submitting this PR. An issue that I see with this PR (which I tried to solve in #11242) is that Service of type ClusterIP with only ClusterIPs set, won't be properly handled. Here, ClusterIP is properly handled only if the ExternalIP is also set.

artuross avatar Oct 30 '24 11:10 artuross

Hello @mlec1 ,

We are reviewing this pull request, to iterate faster, can we push review commits on your branch? If you prefer we can open a pull request on it.

nmengin avatar Nov 27 '24 09:11 nmengin

@nmengin Yeah no problem, if you need more permissions, I can add you to my project directly

mlec1 avatar Nov 27 '24 09:11 mlec1