-
Notifications
You must be signed in to change notification settings - Fork 5.7k
docs(specs): Labels and Selectors for Plugin Enablement #16884
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The content of the spec looks good to me. Only some markup changes requested.
Please also increase/decrease headings by 1 per step. (not 3)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the spec @neelayu and sorry for this taking so long! I do have some suggestions in the document...
## Previous Issues | ||
|
||
[Issue #9304](https://github.com/influxdata/telegraf/issues/9304) | ||
|
||
[Issue #1317](https://github.com/influxdata/telegraf/issues/1317) | ||
|
||
[Issue #10543](https://github.com/influxdata/telegraf/issues/10543) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Previous Issues | |
[Issue #9304](https://github.com/influxdata/telegraf/issues/9304) | |
[Issue #1317](https://github.com/influxdata/telegraf/issues/1317) | |
[Issue #10543](https://github.com/influxdata/telegraf/issues/10543) | |
## Related Issues | |
- [issue #1317](https://github.com/influxdata/telegraf/issues/1317) for allowing to enable/disable plugin instances | |
- [issue #9304](https://github.com/influxdata/telegraf/issues/9304) for partially enable a config file | |
- [issue #10543](https://github.com/influxdata/telegraf/issues/10543) for allowing to enable/disable plugin instances |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either you didn't push the change or you didn't apply it... At least the current code is still the old one...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably got overwritten. thanks
d3c6bcf
to
4012095
Compare
Hi @srebhan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update @neelayu! I have some comments in the code...
Please wrap the text (not tables or code) at 80 columns as this is the convention.
Furthermore, I do have a question: With the current description how do you select
(app=web AND region=us-east) OR (app=backend AND region=eu-central)
with the --label
flags? I think you need to support lists also on the command-line flag to do this. Anyway, I'm OK to keep the spec as is and extend it later...
|
||
## Keywords | ||
|
||
configuration Management, dynamic plugin selection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
configuration Management, dynamic plugin selection | |
configuration, dynamic plugin selection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Currently, managing plugin configurations across multiple Telegraf instances is cumbersome. Methods like commenting out plugins or renaming configuration files are not scalable. A label and selector system provides a more flexible and elegant solution. | ||
|
||
This feature aims to simplify plugin management in Telegraf by introducing a label and selector system inspired by [Kubernetes](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). Labels are key-value pairs provided at runtime, and selectors are defined in plugin configurations to match against these labels. This approach allows to enable plugin dynamically at startup-time, making it easier to manage configurations in large-scale deployments where a single configuration is fetched from a centralized configuration-source. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please wrap the text at 80 columns. Furthermore, use indirect links as that's more readable and we do it everywhere else (at least we should)...
Currently, managing plugin configurations across multiple Telegraf instances is cumbersome. Methods like commenting out plugins or renaming configuration files are not scalable. A label and selector system provides a more flexible and elegant solution. | |
This feature aims to simplify plugin management in Telegraf by introducing a label and selector system inspired by [Kubernetes](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). Labels are key-value pairs provided at runtime, and selectors are defined in plugin configurations to match against these labels. This approach allows to enable plugin dynamically at startup-time, making it easier to manage configurations in large-scale deployments where a single configuration is fetched from a centralized configuration-source. | |
Currently, managing plugin configurations across multiple Telegraf instances is cumbersome. Methods like commenting out plugins or renaming configuration files are not scalable. A label and selector system provides a more flexible and elegant solution. | |
This feature aims to simplify plugin management in Telegraf by introducing a label and selector system inspired by [Kubernetes][k8s_labels]. Labels are key-value pairs provided at runtime, and selectors are defined in plugin configurations to match against these labels. This approach allows to enable plugin dynamically at startup-time, making it easier to manage configurations in large-scale deployments where a single configuration is fetched from a centralized configuration-source. | |
[k8s_labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. made the changes
## Previous Issues | ||
|
||
[Issue #9304](https://github.com/influxdata/telegraf/issues/9304) | ||
|
||
[Issue #1317](https://github.com/influxdata/telegraf/issues/1317) | ||
|
||
[Issue #10543](https://github.com/influxdata/telegraf/issues/10543) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either you didn't push the change or you didn't apply it... At least the current code is still the old one...
## Previous Issues | ||
|
||
[Issue #9304](https://github.com/influxdata/telegraf/issues/9304) | ||
|
||
[Issue #1317](https://github.com/influxdata/telegraf/issues/1317) | ||
|
||
[Issue #10543](https://github.com/influxdata/telegraf/issues/10543) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Previous Issues | |
[Issue #9304](https://github.com/influxdata/telegraf/issues/9304) | |
[Issue #1317](https://github.com/influxdata/telegraf/issues/1317) | |
[Issue #10543](https://github.com/influxdata/telegraf/issues/10543) | |
## Related Issues | |
- [issue #1317](https://github.com/influxdata/telegraf/issues/1317) for allowing to enable/disable plugin instances | |
- [issue #9304](https://github.com/influxdata/telegraf/issues/9304) for partially enable a config file | |
- [issue #10543](https://github.com/influxdata/telegraf/issues/10543) for allowing to enable/disable plugin instances |
This would mean we pass selectors = ["app=web,region=us-east", "app=backend,region=eu-central"] To match it against the labels, we require a list of labels and it is documented in this spec. We would pass one or more --label="app=web" --label="region=us-east" --label="another=value" This would match for the first selector. This case is present in the 5th example of the table. |
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 👍 This pull request doesn't change the Telegraf binary size 📦 Click here to get additional PR build artifactsArtifact URLs |
Summary
Provides a spec for Plugin enable and disablement using labels and selectors.
Checklist
Related issues
resolves NA
related #16704