Open greggbjensen opened 4 years ago
Thanks @greggbjensen for logging this issue.
You should be able to bypass this problem by setting directly the kubernetes-route-as
HTTP header expected by Bridge to Kubernetes when accessing your URL: the subdomain that we create is just a convenient way to populate the kubernetes-route-as
HTTP header, but you can also set it directly through tools such as Postman, Fiddler, or even using a browser extension.
If you want more details, please see @pragyamehta's answers on this issue: https://github.com/microsoft/mindaro/issues/50 The issue is not related to your problem, but the solutions offered there should unblock you as well.
That said, I recognize that this is not the perfect user experience. @pragyamehta, do you know if not making the subdomain the first part of the URL is something we can technically support, or do you already foresee potential issues given our implementation?
Thanks @daniv-msft, it seems I could set this in the ingress using an annotation.
nginx.ingress.kubernetes.io/auth-snippet: |
proxy_set_header kubernetes-route-as some-machine-28;
I will try that out.
Having out of the box support for this would be great.
@greggbjensen Can you briefly describe your Nginx Ingress Setup? I'm trying to do some research and see if I'm able to setup Bridge to Kubernetes in Isolation mode and I'm wondering if using the Nginx Ingress with this annotation would allow me to forward each developer on my team to their own app.
Feature
In Azure DevSpaces, we can customize the domain generation for spaces. For example:
Currently, Bridge to Kubernetes requires the first sub-domain in the full domain name as the space name. This doesn't work for our uses cases, since our first sub-domain is an organization URL token we use to access the correct organization database.
Suggested Solution
Add a domain template configuration with a token place holder for the machine or space name:
Alternatives
The only alternative at this point would be for us to change how we process domains, but having the first sub-domain be an organization-specific token is common in the industry.
Additional context
This currently works for us in DevSpaces, but is not yet supported in Bridge to Kubernetes. We are trying to convert over when it is supported.