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

Add support for setting values for custom models using agentctl #1740

Closed
fgschwan opened this issue Oct 9, 2020 · 1 comment
Closed

Add support for setting values for custom models using agentctl #1740

fgschwan opened this issue Oct 9, 2020 · 1 comment

Comments

@fgschwan
Copy link
Collaborator

fgschwan commented Oct 9, 2020

Problem

When 3rd party registers custom proto models (for 3rd party plugins), they have not the ability to use Configurator service (or agentctl config) to configure the agent remotely.

This is because the ConfiguratorService uses pre-defined proto message Config for retrieving or modifyng the configuration and it contains only configuration(models) in the official vpp-agent. For it to be able to use it for custom models, users would need to edit the proto file definition which could only be done via forking the vpp-agent repo which is not maintainable.

Solution

Agentctl uses non-generic configurator. We should change it to generic client configurator that could use its known models method from API that contains also 3rd party models (they are registered). Then transform the models into proto-generated go structures(using dynamic tool) that can be used with generic configuration client (see example) to configure it the same way as before but with 3rd party models. We need also write conversion in opposite direction (proto-generated go struct to model from known models) to replace configuration client in whole agentctl's config submodule.

Considered Alternatives

  • Add repeated google.proto.Any field to the Config message in the configurator.proto model that could contain 3rp party custom models
    Problems with supporting 2 ways how to configure data, mixing dynamic/static configuration (possible setting of static part in with dynamic configuration=problem), it doesn't solve future additions in existing configurations (for agentctl yaml config update)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants