Users desire to only deploy specific Meshery adapters based on their service mesh needs.
The Meshery configuration file (config) describes contexts which define Meshery deployments: server location, adapters, release channel subscription, user tokens and so on.
While the deployment artifacts (Docker compose file, Kubernetes manifests, helm charts and so on) for Meshery will be in separate files, each context defined in the Meshery config file should carry the definition of which adapters are to be included in which Meshery deployment.
Note:
system context section of Meshery CLI Commands & Documentation--adapters [istio | linkerd | osm | ... ] flag to accept 1 or more adapter names.-a as shorthand for --adapters.config file is valid yaml.context includes includes an adapters collection with 0 or more adapters defined.system context create <name> that does not include --adapters flag will create a context that includes all adapters.@sladyn98 interested?
@leecalcote I can take this up if no one is working on this.
@navendu-pottekkat I was looking to start contributing in Go. Could I consider this issue for the same? Is it solvable by someone with an intermediate knowledge of Go?
The new context command enables users to adjust which adapters they want to have running. While this command doesn't provide the flag listed above (--adapters), yet, Meshery's docs need to be updated to provide users a description of the config.yaml(meshconfig) file and how to update it.
@leecalcote @metonymic-smokey Adding the --adapters flag should be straightforward. That can be done now I think...
@navendu-pottekkat , this is what I've done so far:

Used pflag for the same and it accepts 1 or more string values.
I understood this flag will mainly be used with the context command. Could you please give me some idea on what I should implement next to include these adapters in the config.yaml file?
Thanks!
I guess the flag would be used in the context create command. So this flag could be local to it. We can modify the context create function to write the list of adapters specified to the specified context when it is created.
@navendu-pottekkat ,
Thanks for the suggestion!
I've changed it to a flag local to system context create.


Thanks!
@metonymic-smokey Great work! Are you writing the specified adapters to the config.yaml file?
@leecalcote This is the desired behaviour right?
I guess the flag would be used in the context create command. So this flag could be local to it. We can modify the context create function to write the list of adapters specified to the specified context when it is created.
Sounds good. If a user wants to modify their context, they can either delete the context and recreate or they can edit the config.yaml.
@navendu-pottekkat , @leecalcote ,
I've opened a draft PR for this issue.
I'm unsure as to why my tests are failing. Could you please let me know how to fix those?
These are the screenshots of my changes:


Please review it and let me know how I should proceed.
Thanks!
Most helpful comment
@leecalcote @metonymic-smokey Adding the
--adaptersflag should be straightforward. That can be done now I think...