vmware-archive / octant

Highly extensible platform for developers to better understand the complexity of Kubernetes clusters.
https://octant.dev
Apache License 2.0
6.27k stars 489 forks source link

Allow users to upload kube config from octant UI #2497

Open xtreme-vikram-yadav opened 3 years ago

xtreme-vikram-yadav commented 3 years ago

Describe the problem/challenge you have Allow users to use any kube config which is not available in the default locaton (~/.kube/config) via octant UI.

Describe the solution you'd like The preferences modal should provide something like a select file component (https://github.com/vmware-tanzu/octant/blob/master/web/src/app/modules/shared/components/presentation/select-file/select-file.component.ts) to allow user to pick a kube config from local machine which can fire something similar to https://github.com/vmware-tanzu/octant/blob/5dbc750c1cb36e6e16eeb556b86293631bcba1db/internal/api/loading_state.go#L50 but instead of the contents, it will send the file path to be read by octant.

Anything else you would like to add: The uploaded kube config will replace the existing kube config used by octant and therefore, a warning should be displayed. (may be right below or above the upload button). Octant should handle the case when an invalid path is sent and can respond with an app level alert.

Environment:

xtreme-vikram-yadav commented 3 years ago

Related issue: https://github.com/vmware-tanzu/octant/issues/1893

vrabbi commented 3 years ago

This would be a huge thing for me and my team for sure!

davidmirror-ops commented 3 years ago

hey @vrabbi looks like this have been addressed in 0.21. Please upgrade Octant and let us know your feedback :)

This would be a huge thing for me and my team for sure!

xtreme-vikram-yadav commented 3 years ago

The update in 0.21 version only shows a file path where the kube config is located. This will be a new feature to allow users to upload a kube config via octant UI anytime which is something they can only do via loading API.