-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Vector YAML configuration - anchors support #20853
Comments
Close pls. Found solution. https://vector.dev/docs/reference/configuration/template-syntax/ |
templating is clunky at best for this kind of thing, i think this should be re opened |
Agreed, anchor support would be useful. Let me reopen this. Unfortunately I also don't expect it to happen anytime soon because the issue on the YAML parsing library that we use has been open since 2022: dtolnay/serde-yaml#317 (and the maintainer has stepped away from that project). |
As a workaround, the configuration file could be pre-processed to expand the anchors. For example, |
Hi @jszwedko, it can be useful right, but need to take one moment into account:
If I do
So that But anyway - I think original request will be useful, I still need this feature in some cases.😅 |
I think that behavior is true, that |
Yeah, having such a special key for templating could solve the issue. |
A note for the community
Use Cases
During configuration of Vector pipeline in YAML format - I've found that vector does not "understand" anchors features in YAML syntax.
I think it will be quite useful to define some templates for i.e. sinks and re-use it.
Let say - I need to route message to same kafka cluster, but to different topics - providing full configuration for each sink with only difference in topic name - can result in vector's config becoming fat.
Attempted Solutions
No response
Proposal
Figure 1 - Vector config in YAML format with multiple sinks to same kafka cluster:
Figure 2 - same config as above but with anchors:
Feel the difference.
References
No response
Version
No response
The text was updated successfully, but these errors were encountered: