Skip to content
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

Manage Kubernetes Context Action #2598

Closed
mohitsuman opened this issue Oct 27, 2022 · 2 comments · Fixed by #2684
Closed

Manage Kubernetes Context Action #2598

mohitsuman opened this issue Oct 27, 2022 · 2 comments · Fixed by #2684
Assignees
Milestone

Comments

@mohitsuman
Copy link
Collaborator

Currently, the Switch Kubernetes context action opens a quick pick action with the list of the config in the kubeconfig file. This becomes tricky to select as the list keeps on growing.

For the user, they should be able to do the following with the Manage Kubernetes Context action:

  • Switch current context
  • Delete any cluster context

Solution:

A quick pick is opened with the list of all configs. Every list has 2 icons once hovered, Switch and Delete.

  1. If the user selects Switch Action:
    -- An information box is shown: Are you sure to switch the context? Yes/No

  2. If the user selects Delete Action:
    -- An information box is shown: Are you sure you want to delete this cluster information from kubeconfig. This action cannot be undone. Yes/No

  3. Rename the Button to Manage Kubernetes Context

@dgolovin
Copy link
Collaborator

There are several objects stored in config: users, clusters, contexts.
Deleting specific context should not end with deleting cluster and user because there might be other contexts using them.

There should be some other restrictions probably. Like not letting to delete last context from the file. We should check what is minimal config file should be looking like so we don't end up with config that other tools will refuse to use.

@mohitsuman
Copy link
Collaborator Author

@dgolovin So for our use case, should we just focus on removing the cluster information from the quickpick, because that's the information we are letting the user make a decision to (to switch or delete)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment