ibotty / openshift-letsencrypt

MIT License
59 stars 31 forks source link

routes with same dns name and different paths #25

Open Hertan opened 7 years ago

Hertan commented 7 years ago

i have routes with same domain but different paths example: i have a route with sucefful installed certificate by openshift-letsencrypt route name: "cdn" with url cdn.mydomain.com route to service nginx-cdn

then i am add several routes route name: "xxx" with url cdn.mydomain.com/xxx route to service nginx-xxx route name: "yyy" with url cdn.mydomain.com/yyy route to service nginx-yyy

But watcher's log shows:

Processing route /oapi/v1/namespaces/mynamespace/routes/xxx with domain cdn.mydomain.com. Certificate for cdn.mydomain.com still valid long enough. Processing route /oapi/v1/namespaces/mynamespace/routes/yyy with domain cdn.mydomain.com. Certificate for cdn.mydomain.com still valid long enough.

And certs not be added to these routes

ibotty commented 7 years ago

I am in holiday, so I can't take care about that right now, but I am certain, that that is an oversight in the code, it should record whether the certificate in the route is valid and if not add the certificate (that might have come from a different route) in any case. If you want to have a go at it, it should only need changes in get_certificate.