Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

show kube config path in preferences #2478

Conversation

xtreme-vikram-yadav
Copy link
Contributor

What this PR does / why we need it: This PR assists the user in finding the local path to kube config which is used by octant. It is useful is case when the user has uploaded the config manually via loading api and a temporary kube config file is created and stored in the temp directory.

Which issue(s) this PR fixes

Special notes for your reviewer:
Steps for reproduction/acceptance:

Given kube config exists in a default location(~/.kube/config)
When the user starts octant
And the user opens preferences
Then the user sees the local kube config path with icon to copy to clipboard
Given kube config does not exist in a default location(~/.kube/config)
When the user starts octant
And the user pastes the kube config in the modal
And the user opens preferences
Then the user sees the local kube config path with icon to copy to clipboard

Some implementation decisions:

The octant.generator interface now returns multiple events which extends a *_manager's capability to perform multiple small computations and stream back multiple results as events. A managers setup is an overkill for implementing small features. This approach helps with testing by keeping the handlerFunc usage the same as before and avoids generator classes doing duplicated work.

@xtreme-vikram-yadav xtreme-vikram-yadav force-pushed the kube-config-path branch 2 times, most recently from ebcee04 to 403357a Compare May 20, 2021 14:55
@mklanjsek
Copy link
Contributor

I am not sure if this is the bast way to solve the problem from user experience point of view. Maybe just making kube.config location directly configurable from preferences would be better and in the same time it would allow users to switch between different configurations. We should probably discuss it as a team.

@xtreme-vikram-yadav
Copy link
Contributor Author

I created #2497 to allow users to upload their kube config.

[vmware-archive#1893]

Signed-off-by: Vikram Yadav <yvikram@vmware.com>
@xtreme-vikram-yadav xtreme-vikram-yadav force-pushed the kube-config-path branch 4 times, most recently from 33af322 to 459ff7b Compare May 31, 2021 19:13
@mklanjsek
Copy link
Contributor

Looks good! You'll need to regenerate mock files before merging.

@xtreme-vikram-yadav
Copy link
Contributor Author

I think it's an environment thing where there are differences in the go generate output. I'll use a linux machine this time to fix it and think of a long term solution to notify of the version differences for tools like mockgen and goimports in the CI.

@xtreme-vikram-yadav xtreme-vikram-yadav force-pushed the kube-config-path branch 3 times, most recently from 6db3f41 to c486c16 Compare June 2, 2021 14:32
Signed-off-by: Vikram Yadav <yvikram@vmware.com>
@xtreme-vikram-yadav xtreme-vikram-yadav merged commit 4ebf70f into vmware-archive:master Jun 2, 2021
@xtreme-vikram-yadav xtreme-vikram-yadav deleted the kube-config-path branch June 2, 2021 22:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kubeconfig location on windows
2 participants