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
Bug 2006329: Allow web terminal to be installed in any namespace #10045
Bug 2006329: Allow web terminal to be installed in any namespace #10045
Conversation
…inal is installed Signed-off-by: Josh Pinkney <joshpinkney@gmail.com>
…mplates in the namespace where the web terminal operators is installed Signed-off-by: Josh Pinkney <joshpinkney@gmail.com>
Signed-off-by: Josh Pinkney <joshpinkney@gmail.com>
frontend/packages/console-app/src/components/cloud-shell/useCloudShellNamespace.ts
Outdated
Show resolved
Hide resolved
frontend/packages/console-app/src/components/cloud-shell/CloudShellTerminal.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/console-app/src/components/cloud-shell/CloudShellTerminal.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/console-app/src/components/cloud-shell/cloud-shell-utils.ts
Outdated
Show resolved
Hide resolved
@@ -25,6 +25,8 @@ const ( | |||
ProxyEndpoint = "/api/terminal/proxy/" | |||
// AvailableEndpoint path used to check if functionality is enabled | |||
AvailableEndpoint = "/api/terminal/available/" | |||
// InstalledNamespaceEndpoint path used to get the namespace where the controller is installed | |||
InstalledNamespaceEndpoint = "/api/terminal/installedNamespace" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need two of AvailableEndpoint
and InstalledNamespaceEndpoint
.
Since backend uses exactly the same logic, maybe client should call something like /api/terminal/available
, /api/terminal/operator
, /api/terminal/operator-namespace
(resolves the operator's namespace or return 404 if it's not installed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm OK with doing either, the only reason why I'm hesitant to make the change is that we would have to modify useCloudShellAvailable.ts and that's called in multiple other non web terminal packages so it would require additional testing/review in those packages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then maybe let's move it out of this PR.
Anyway someday we need to rename cloud-shell stuff to terminal, because it's really outdated terms )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found one nit, otherwise the backend changes look good 👍
Signed-off-by: Josh Pinkney <joshpinkney@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verified locally by following the steps in the description, works as expected
/retest |
@JPinkney: This pull request references Bugzilla bug 2006329, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/bugzilla refresh |
@christianvogt: This pull request references Bugzilla bug 2006329, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, JPinkney, sahil143 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@JPinkney: All pull requests linked via external trackers have merged: Bugzilla bug 2006329 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
As of OpenShift 4.8 the console hardcodes the namespace where the devworkspacetemplates live as openshift-operators. In order to support fully support OSD (and devsandbox), we need the ability to have the devworkspacetemplates and the web terminal operator to be installed in other namespaces then openshift-operators and have those devworkspacetemplates still be picked up by the console. This PR is in conjuction with another PR on the web terminal operator which makes it so that devworkspacetemplates are installed in the namespace where the operator is installed.
In order for the console to correctly reference the namespace where the devworkspacetemplates live it follows this flow when the terminal button is clicked:
Testing instructions:
quay.io/jpinkney/console:installable-anywhere4
To actually verify that everything is working:
found multiple subscriptions for web-terminal when only one should be found
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=2006329