-
Notifications
You must be signed in to change notification settings - Fork 710
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
TfJobs dashboard doesn't work with K8s API server proxy or envoy proxy #323
Comments
This is because using see: https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/
Prometheus and Kashti for example only work with |
FYI i work with Docker for Mac locally, with support for Kubernetes. |
I think we should try to design our UIs to support having a path prefix. I think I think an alternative solution would be to give services their own hostname e.g. I think we can use External DNS but a lot of questions with that approach still remain for me e.g |
So as part of creating a generic reverse proxy solution (kubeflow/kubeflow#11) I tried out TB and the dashboard UI behind an Envoy based reverse proxy. TensorBoard works but the jobs UI doesn't. My reverse proxy is rooting the app at
When I navigate to that page chrome developer console reports a 200 for the main page
But then there are failed requests to some resources because the request path isn't rooted correctly
The correct paths should be
Both of which return 200. I'm guessing this is an issue in the app/html using something like an absolute path as opposed to relative paths. |
What does the Ambassador annotation added for this service look like? |
This is the generated TFJob service YAML:
|
If I'm reading things correctly in the report above, then switching the annotation to use
seems like it should probably fix the issue. |
Let me try it out. Thank you for your comments @kflynn. |
Mea culpa -- left out a
|
Ah I made the same mistake, last time as well.
This is the curl output:
|
This is where I suggest dropping into the Ambassador Gitter channel so we can get this sorted out. :) |
Sure thing 👍 |
To summarize the conversation from the Ambassador Gitter channel: I misunderstood what @jlewi said a month ago about where the application was expecting to be rooted vs where the Ambassador Given that the application thinks it's rooted at
If this is the only such application that needs to live behind this Ambassador, that should be enough -- Ambassador knows how to sort If this is not the only such application, you'll need another constraint in the |
Just a thought. We could change the dashboard service slightly.
Proposed change:
And then the ambassador service annotation to be,
Would this be a viable solution? I don't know about the ramifications of this change. |
@swiftdiaries I don't see any issue with your approach, however this would need a bit of testing.
I haven't been very active as I am finishing a round of non-stop travel for work, but if you think this issue can be more cleanly solved by modifying the front-end let me know and I will try to find some time to do that. |
@swiftdiaries per @kflynn's comment above
Can we fix the APP (its our code :)) so it will use the correct root? I believe we want to configure Ambassador using
If we do this then I'd expect the request that hits the UI has in it somewhere the URL
So we'd like the UI to use So can we update our REACT app to correctly compute the ROOT and then use that as a prefix for URLs? |
I'll take a look at this. |
try adding homepage to package.json in tf-operator/dashboard/frontend
See facebook/create-react-app#527 and https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#building-for-relative-paths I wanted to test this out myself - i'm a bit unclear how to build/release - it looks like you prep a docker image to do the build and then build within that docker image? The developer instructions seem to assume you're on a linux machine or vm. |
I have the dashboard running and tried accessing it over the K8s API server proxy. For a brief second I see the dashboard but then I just get a grey screen.
When I connect via
kubectl port-forward
to the pod it works.is this expected?
The text was updated successfully, but these errors were encountered: