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

[POC] Extensible config management #1992

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

albinsuresh
Copy link
Contributor

@albinsuresh albinsuresh commented May 26, 2023

Proposed changes

POC to extend config management capabilities of c8y-configuration-plugin with user-provided extensions.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments


```toml
exts = [
{ exec = '/etc/tedge/config-plugins/camera-agent.sh', type = 'traffic-cam-1' },
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was in two-minds on specifying the type here in the config file. Another possible approach would have been to support a list command as well, just like software management plugins, that'll allow these extensions to declare the configuration types that they can support.

I stuck with this option as I felt that such extension scripts would be fairly generic and would be able to handle any number of config(app) instances. Making that script discover all the deployed configs(and even filtering them) probably is much more work for the end-user than just listing the instances that he wants to manage in the config file itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant