-
Notifications
You must be signed in to change notification settings - Fork 169
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
frontend: Home: Show the origin of each cluster #2536
Conversation
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.
👍 thanks
Left a couple of notes...
213e574
to
2469fb3
Compare
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 just noticed this part from the issue...
(if we could have the plugin name here or a string identifying who added it'd be great).
I'm not sure where to get that information from though?
Yeah this isn't stored anywhere. The cluster metadata only includes the source so there wouldn't be any way to infer what the relevant plugin name is or who added it. |
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.
👍 thanks
(probably just the translation change should be done, the docs change is just a nit)
This change introduces a new "Origin" column for the cluster list on the home page, displaying whether a cluster came from a kubeconfig, Headlamp, or a dynamic cluster, with references when available. Fixes: #1632 Signed-off-by: Evangelos Skopelitis <eskopelitis@microsoft.com>
2469fb3
to
6d0dc28
Compare
Right. We can check if it's coming from a kubeconfig or it's been dynamically added. We should add a way (not related to this PR) for the plugins to register what the origin of their dynamically added cluster should be. |
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 think a few things can be improved.
function getOrigin(cluster: Cluster): string { | ||
if (cluster.meta_data?.source === 'kubeconfig') { | ||
const kubeconfigPath = process.env.KUBECONFIG ?? '~/.kube/config'; | ||
return t('translation|Kubeconfig') + ` (${kubeconfigPath})`; |
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.
We don't need to translate Kubeconfig. And the value here should be: kubeconfig:PATH_TO_FILE
Can you make another PR to fix this, since this one is merged?
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.
This change as well as the other one mentioned are done here: #2543
This change improves on #2536 by adjusting the labels in the cluster origin column of the Home page for clarity and accuracy. Signed-off-by: Evangelos Skopelitis <eskopelitis@microsoft.com>
This change introduces a new "Origin" column for the cluster list on the home page, displaying whether a cluster came from a kubeconfig, Headlamp, or a dynamic cluster, with references when available.
Fixes: #1632
Testing