Automatic domain for serverless functions
Description
Currently, whenever someone installs Knative to make use of our Serverless offering, they need to assign a custom domain before hitting "Install" button to start Knative app installation process.
This is not optimal because one needs to leave GitLab to configure DNS zone A
record once ingress gateway gets a public IP assigned.
Problems:
- One needs to have a domain / subdomain that they control.
- It is required to configure the domain manually after the public IP address gets assigned.
Proposal
Follow the same pattern as base domain:
- Add setting to admin area and allow user to set a domain. For example:
*.serverless.gitlab.io
- Auto populate the Knative field on the cluster detail view (instance, group, or project level). For example:
root-example-project.serverless.gitlab.io
- Allow the user to change the domain prior to installing Knative.
There is no need for an additional settings or checkbox to toggle between the default or custom domain.
previous proposal
Make it possible to define a default domain in the instance and group settings.Example:
- On gitlab.com we go to Admin -> Serverless Settings.
- We enter default domain "serverless.gitlab.io"
- A user wants to create a new Knative app, sees checkbox "use default domain *.serverless.gitlab.io"
- If they check this checkbox it is not necessary to provide a custom domain.
- Once Knative gets installed and a public IP address gets assigned `*.namespace.serverless.gitlab.io" works out-of-the-box.
Technical details
We can resolve this technical problem using two different directions.
- After the cluster ingress gateway gets the IP address assigned we configure the subdomain using domain provider's API.
- We create a serverless access daemon that would behave in a similar way Workhorse / GitLab Pages do. It would be a proxy and all the serverless traffic would go through this app. This allows us to support more features like enforcing SSL and perhaps terminating SSL too, but requires more work.