ibotty / openshift-letsencrypt

MIT License
59 stars 31 forks source link

work across namespaces #4

Open ibotty opened 8 years ago

ibotty commented 8 years ago

There can't be routes with the same hostname in different namespaces. That leaves two options for serving the well-known routes (webserver).

It has the following big downside: It can't work with multiple namespaces. You'll have to deploy one instance, one service account, one acme credential and set the service account's permissions for every namespace.

It does only use one pod with three containers per namespace though and is conceptional easy.

Separated Webserver

I can think of the following options.

Both will slow down certificate deployments considerable (scheduling, pulling, starting the webserver pod).

I tend to favor a separated webserver and on-demand spawning. Opinions welcome!

ibotty commented 8 years ago

I am thinking about the following plan.

at least until PalmStoneGames/kube-cert-manager#20 is implemented.

loa commented 7 years ago

Perhaps use dns challenge instead? This would remove the need of proxy'ing the standard acme-challenge.

jam13 commented 7 years ago

Have you considered using a modified router image to handle the /.well-known/acme-challenge path globally? It should be possible to use a custom haproxy-config.template to route challenge requests to a handler running in the default namespace either for every route, or limited to routes with a particular label.

The template can actually be replaced without modifying the image too afaik:

https://docs.openshift.com/container-platform/3.3/install_config/router/customized_haproxy_router.html

I was considering having a hack at it, but thought I'd check in case you'd considered it already and discounted it for good reasons.

ibotty commented 7 years ago

I did consider it, but dismissed it. My main argument is that it makes it non-standard and that it's not possible to compose changes to the router template (most of my clients already run a modified template). If you would like to have a go, please do. But keep the following in mind:

webner commented 7 years ago

The namespace check can be disabled. (At least for Openshift Origin 1.5) Of course you should only do that if you trust all your users or make sure they can't create routes on there own.

Simple set ROUTER_DISABLE_NAMESPACE_OWNERSHIP_CHECK=true on your router deployment or create your create with the --disable-namespace-ownership-check flag.

https://docs.openshift.org/latest/architecture/core_concepts/routes.html#disable-namespace-ownership-check https://github.com/openshift/origin/commit/d2dd4668c37281f5b12caf6edfa10c4ec8933693

ibotty commented 7 years ago

I meant, that you could circumvent that check when deploying a template including explicit .well-known/acme-challenge.