Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple domains #496

Closed
jimmykarily opened this issue Jun 16, 2021 · 12 comments · Fixed by #942
Closed

Support multiple domains #496

jimmykarily opened this issue Jun 16, 2021 · 12 comments · Fixed by #942
Assignees
Labels
area/installation kind/spike Excluded from release notes. This issue covers some kind of research
Milestone

Comments

@jimmykarily
Copy link
Contributor

jimmykarily commented Jun 16, 2021

A user may want to use different domains for different applications. Right now, Epinio only supports one domain (the system-domain) and app routes are subdomains of that. Other PaaS (like Heroku for example), solve this by allowing the user to set a CNAME and point it to the application's subdomain. This may involve some updating of the underlying certs (additional CN values etc).

We need to investigate how multiple domains can be supported. If CNAMEs don't solve this, we probably need to "register" the domains with Epinio (like CloudFoundry does with shared and private domains).

Things to try out:

  • Try to set a CNAME and see if Epinio works automagically
  • If the above doesn't work, try to see how the CNAME could work (update the app cert?)
  • Check other options (like registering domains on Epinio)

Questions to be answered:

  • What about the other routes (the Epinio API url for example)
  • When can the user specify the application domain? Only when first pushing or can be done on any later push?
@agracey
Copy link
Contributor

agracey commented Jul 12, 2021

@jimmykarily You mentioned that CNAME would be a work around, but I'm not sure it would as the request would still have the same headers when traefik looks at it.

@jimmykarily
Copy link
Contributor Author

True, and we may need to update/re-create application TLS certificates with additional alternative names. It may not be that simple but we should give it a try first and see what happens.

@jimmykarily jimmykarily changed the title Support multiple domains [Spike] Support multiple domains Aug 2, 2021
@jimmykarily jimmykarily added the kind/spike Excluded from release notes. This issue covers some kind of research label Aug 2, 2021
@jimmykarily jimmykarily changed the title [Spike] Support multiple domains Support multiple domains Aug 2, 2021
@agracey
Copy link
Contributor

agracey commented Aug 13, 2021

One question that we will get is how to publish an app at the root of the domain as well. Currently we can only support subdomains

@agracey
Copy link
Contributor

agracey commented Aug 31, 2021

When we do this, it'd be nice if we also take @manno's idea in: #384

@agracey
Copy link
Contributor

agracey commented Aug 31, 2021

This should be configurable on each push command and is a dependency of #594

@manno
Copy link
Member

manno commented Sep 6, 2021

Maybe something like e push --domain a.b.c --ingress-class default

@kkaempf kkaempf added the beta2 label Sep 13, 2021
@agracey
Copy link
Contributor

agracey commented Sep 22, 2021

Just to add some conversation that @jimmykarily and I just had around this:

The first take of this can require a new push to change hostname(s). We can leave editing hostnames after deployment for a future ticket closer to GA.

@kkaempf kkaempf removed the beta label Oct 11, 2021
@jimmykarily
Copy link
Contributor Author

Let do this for now:

The system domain defined during installation is the "default" one. "default" means that's the domain used for the epinio api and the epinio registry.

The user can add more domains with some (new) command (e.g. epinio domain create google.com). This should store that domain somewhere in the cluster (secret?). The user should be able to list the available domains and should be able to pick one when deploying an application.

To change the domain of an app, the user should be able to "add" a domain to the app. This should only create a new Ingress an the related certs. That new ingress should still point to the same app through the same service. Then the user can "remove" the old domain from the app making the whole process zero-downtime.

When pushing an app for the first time, the user should be able to pick which domain should be used.

I would defer the 3 other issues to separate tickets:

  1. specific domain pointing to an app (no subdomain)
  2. picking a different ingress
  3. path based routing (which is Path based routing #594)

@jimmykarily
Copy link
Contributor Author

In order to have two apps using the same domain but a different path (#594) , the user must be able to set the domain to that of another app. That means set the full final domain, not just the domain on which the app will get a subdomain from (like it happens now).

I think the solution should work like this:

  • If the user doesn't specify a domain, the app will get a subdomain on the "default" domain
  • If the user specifies a domain, that should be the complete one. Epinio won't will point that to the app, not a subdomain of it.
  • When registering domains on Epinio (as described above), those will be used as per the previous item. The only domain that gets subdomains is going to be the "default" one which is the one that was used during epinio install.

@agracey is that plan ok? Do we need to have additional domains that behave like the default one? I mean additional domains which will be used to automatically create subdomain for apps.

@agracey
Copy link
Contributor

agracey commented Oct 21, 2021 via email

@jimmykarily
Copy link
Contributor Author

jimmykarily commented Oct 25, 2021

Let's split this in 2 stories:

  1. Allow the user to specify a domain for the application (specify during "push", add/remove domains afterwards). This domain doesn't have to be registered and it's not validated on the server side. The epinio server will just use it.
  2. Allow the user to pre-register domains for applications. The epinio-server won't allow the user to use any non-registered domain. [TBD] Should the user register the top level domain or each and every app domain? If it's possible, top-level domain is earier for the user.

Let's keep this story for number 1. We will do number 2 here: #931

@jimmykarily jimmykarily self-assigned this Oct 25, 2021
jimmykarily pushed a commit to epinio/application that referenced this issue Oct 26, 2021
jimmykarily pushed a commit to epinio/application that referenced this issue Oct 26, 2021
@jimmykarily
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/installation kind/spike Excluded from release notes. This issue covers some kind of research
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants