(BB-1402) Add support for setting up arbitrary subdomain.
When creating an instance there's a few default subdomains that are configured by default. In this context configured means the correct configuration line in haproxy's config file as well as having cert-manager use let's encrypt to create the domain's certificate.
The way this configuration works for default subdomains is that Ocim creates a consul k/v pair with the necessary information (instance and domain list) and there are two different consul watch
processes running that configure OC's haproxy and run certbot
when there's a change on consul's side.
This PR leverages that by adding a text area in the instance's admin interface. In this text area a user can add multiple sub-domains (one in each line). Each subdomain is verified to be a subdomain of the main lms
domain and added to the instance's consul configuration. The rest of the configuration (haproxy and cert-manager) works as expected.
Testing instructions
- Checkout this branch and run Ocim and consul locally.
- Create an instance and query consul. You should see a domain config key like this one: