kube-lego icon indicating copy to clipboard operation
kube-lego copied to clipboard

Support for same host duplicated across ingress objects

Open renaudguerin opened this issue 7 years ago • 7 comments

Hi,

For various reasons I need to have the different paths for a host spread across different ingress objects (mainly to enable http basic-auth on some paths only, since there's no way to set this at the "rule" level and it can only be done using ingress-level annotations)

I couldn't find a way to make kube-lego play nice with this. I do want to share the same certificate/secret for the same host across these different ingress objects, but it complains with : the secret xxxxxx/default is used multiple times. These linked TLS ingress elements where ignored:

And it then ignores all TLS ingress elements, not just additional duplicates but even the first definition it encounters.

Is there a workaround I'm missing ? Could kube-lego handle duplicates more gracefully maybe (gather the list of hosts/secrets needed across all ingresses, de-duplicate if needed, and request) ?

renaudguerin avatar Sep 26 '16 12:09 renaudguerin

I was just scared by the complexity of implementing this. It should not be that hard after all, as we are assessing the host information as aggregated information once a change happens. But not exactly a priority for me...

simonswine avatar Sep 29 '16 12:09 simonswine

Does it also skip certificates renewal? I am having the same problem :(

bartoszhernas avatar May 05 '17 13:05 bartoszhernas

Any update on this? Or any place I can help implement it?

kilpatty avatar Jun 16 '17 13:06 kilpatty

I'm running with https://github.com/jetstack/kube-lego/pull/142 in production, for the same use case (multiple ingress objects, each contributing parts of the whole).

ankon avatar Jun 19 '17 14:06 ankon

Can someone merge #142 ?

bartoszhernas avatar Jul 03 '17 10:07 bartoszhernas

Just ran into this today. GKE requires running two separate Ingresses for handling IPv4 and IPv6 traffic, so there are valid scenarios that this overzealous protection is breaking. Guess I'll try cert-manager or #142.

abevoelker avatar Mar 23 '18 19:03 abevoelker

I've just hit this when the certificate expired. I've set the newer ingress to use a different secret and kube-lego seems to have sorted this out (they are the same host). Are there any risks doing this?

sjdweb avatar May 14 '18 16:05 sjdweb