Disable terminal scheduling on non-managed seeds#2358
Disable terminal scheduling on non-managed seeds#2358Lappihuan wants to merge 6 commits intogardener:masterfrom Lappihuan:master
Conversation
…n the garden namespace Signed-off-by: Oriano de-Stefani <ode@exigo.org>
Signed-off-by: Oriano de-Stefani <ode@exigo.org>
|
@Lappihuan Thank you for your contribution. |
|
Thank you @Lappihuan for your contribution. Before I can start building your PR, a member of the organization must set the required label(s) {'reviewed/ok-to-test'}. Once started, you can check the build status in the PR checks section below. |
|
@grolu, @holgerkoser You have pull request review open invite, please check |
grolu
left a comment
There was a problem hiding this comment.
/lgtm
Removing namespace !== 'garden' should not break anything. If a seed is not managed, canLinkToSeed will be false. It was just an assumption that shoot resources in garden namespace will not have a seed that is managed but it is fair to remove it as this could be the case.
Also, using canLinkToSeed as an indicator for the terminal that the seed is managed is considered a workaround. It would be better to actually read the ManagedSeed resources in the backend and add a proper field to the shoot info. But we can target this in a separate PR.
After some internal discussions we found some issues with this PR:
Using the suggested approach, terminals would never be visible for regular users (non operators) as canLinkToSeed would always be false.
Also, for operators it should still be possible to schedule a terminal on the cluster even if the seed cannot be used to schedule a terminal. So disabling those options need to be implemented on the GCreateTerminalSessionDialog. Also, the operator needs to be informed (e.g. via tooltip) why scheduling a terminal on the seed is not possible.
See original comment in issue:
The dashboard should disable or hide the option to schedule a terminal on a Seed if it is not a managed seed. The frontend should detect whether a Seed is managed and adjust the available options accordingly.
It seems this is the way forward then. So it depends on #1417 |
So yes, in the long run this is the preferred solution. @petersutter already started working on watching seeds in the dashboard frontend. However, I cannot give an estimation on the timeline as we are currently blocked with other things. |
* Do not fail terminal config call if shoot API server is unreachable Handle case when no shoot nodes are available (empty selection) Disable create button in this case * Moved alerts from subcomponents to GCreateTerminalSessionDialog to move them out of scrollable container This ensures that they are always visible * Apply suggestions from @Lappihuan PR #2358 * Proposal for disabling terminal scheduling on non-managed seeds * Fixed create disabled for some scenarios Added alert with error message in case no nodes are available to schedule terminal * Disable terminal shortcuts for target control plane Disable terminal shortcuts for target shoot for operators * - Removed loading placeholder - Fixed flaky initial default target - Fixed terminal component initialization issue during navigation (loading state set too early, causing router-view to be returned before the navigation took place) * PR Feedback * PR Feedback
What this PR does / why we need it:
This disables the terminal on shoots that are not on a managed seed, using the suggestion from #2170 (comment)
Which issue(s) this PR fixes:
Fixes #2170
Special notes for your reviewer:
I'm unsure why there was a check on the garden namespace, but this excluded all shoots in the garden project.
https://github.com/gardener/dashboard/pull/2358/files#diff-6ed2ba0f6d68010cb296caa1dfe39da1cd2acf7dabd973d99fdf670d5849907fL307-R307
This might cause a bug elsewhere.
Release note: