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

[mesheryctl] mesheryctl system config minikube command workflow #12704

Open
Alero-Awani opened this issue Nov 20, 2024 · 5 comments · May be fixed by #13157
Open

[mesheryctl] mesheryctl system config minikube command workflow #12704

Alero-Awani opened this issue Nov 20, 2024 · 5 comments · May be fixed by #13157
Labels
component/mesheryctl CLI for Meshery help wanted Extra attention is needed issue/willfix This issue will be worked on kind/enhancement Improvement in current feature language/go Issues or pull requests that use Golang

Comments

@Alero-Awani
Copy link
Contributor

See mesheryctl Command Tracker for current status of commands.

Current Behavior

The mesheryctl system config minikube command has usability issues due to its workflow and dependencies.

  1. Authentication Dependency: Users must log in to the Meshery server using mesheryctl system login before running the command. This sequence is not straightforward and can confuse new users.
  2. Workflow Complexity: The command handles two tasks at once — processing the kubeconfig locally (minifying and flattening) and uploading it to the server — which makes the process harder to follow.

The current required workflow involves:

  1. Starting the Meshery server: mesheryctl system start.
  2. Logging into the Meshery server: mesheryctl system login.
  3. Running the mesheryctl system config minikube command to:
  • Minify and flatten the kubeconfig file based on the current context.
  • Write the processed file to a new path to avoid modifying the original kubeconfig.
  • Upload the processed kubeconfig to the Meshery server.

Desired Behavior

The mesheryctl system config minikube command might need to be deprecated and its core functionality integrated into mesheryctl system start to simplify the user workflow. Specifically:

The kubeconfig file should be automatically minified, flattened, and uploaded to the Meshery server as part of the initialization process during mesheryctl system start.
This change will eliminate the need for users to run a separate command for kubeconfig processing and uploading.

Implementation

  1. Investigate Existing Code:
  • Review the full functionality of the mesheryctl system config minikube command by analyzing its code and dependencies.
  • Evaluate its necessity and any unique functionality that cannot be integrated into mesheryctl system start.
  1. Assess Command Relevance: Determine if there is a compelling reason to keep the mesheryctl system config minikube command (e.g edge cases, advanced workflows).

  2. Integrate Functionality:

  • Migrate the core functionality of minifying, flattening, and uploading kubeconfig files into the mesheryctl system start command.
  • Ensure seamless kubeconfig processing and uploading during Meshery initialization.
  • If this functionality is already available in the start command, ensure that is is working properly.

Code Reference

Mesheryctl system config code


Contributor Resources

@Alero-Awani Alero-Awani added kind/enhancement Improvement in current feature component/mesheryctl CLI for Meshery language/go Issues or pull requests that use Golang labels Nov 20, 2024
Copy link

This issue has been labeled with 'component/mesheryctl'. Note that after making changes you need to update it in the mesheryctl command tracker spreadsheet.


        Be sure to join the community, if you haven't yet and please leave a ⭐ star on the project 😄

@leecalcote leecalcote added help wanted Extra attention is needed issue/willfix This issue will be worked on labels Nov 20, 2024
@Alero-Awani Alero-Awani changed the title [mesheryctl] mesheryctl system config minikube Command workflow [mesheryctl] mesheryctl system config minikube command workflow Nov 21, 2024
@weilirs
Copy link
Contributor

weilirs commented Dec 6, 2024

Can I work on this?

@yaten2302
Copy link
Contributor

yaten2302 commented Dec 25, 2024

Hi @Alero-Awani @leecalcote , could you please have a look that is this(updated) approach correct?
The new workflow look something like this:

  1. Start the meshery server - mesheryctl system start minikube.
  2. IF login == true, then connect to minikube
  3. ELSE login (while the server is running). (Add support for login command within the start command)

OR

  1. Start the meshery server - mesheryctl system start
  2. Login - mesheryctl system login
  3. connect to minikube|aks|eks|gke - mesheryctl system start minikube.

@yaten2302 yaten2302 linked a pull request Jan 5, 2025 that will close this issue
1 task
@lekaf974
Copy link
Contributor

lekaf974 commented Jan 5, 2025

@yaten2302 something not described in the issue is that mesheryctl system start has -p/--platform <kubernetes|docker> flag which kubernetes is the default one if I am right. So proposed solution looks not working in case the platform choosen is docker.

@yaten2302
Copy link
Contributor

@lekaf974 , I've a doubt that, if we follow the previous workflow (i.e. separate start and config commands), and then try to start meshery with docker, then will it also create issues, or will it work? Because, while integrating these 2 commands, I didn't change any func.
Is there some issue with my proposed workflow, which I mentioned above? Or could you please guide what this problem might be related to so that i can research more into it?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/mesheryctl CLI for Meshery help wanted Extra attention is needed issue/willfix This issue will be worked on kind/enhancement Improvement in current feature language/go Issues or pull requests that use Golang
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants