-
Notifications
You must be signed in to change notification settings - Fork 142
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
Streaming aggregation config files as CRDs in VM operator for K8s #788
Comments
Thanks for the idea! |
cc @Amper |
An idea: You can define which targets with some label or annotation. If there is a single target, then all annotation applies. If there are multiple ones, then |
I agree with this approach, when using the default k8s-stack. in order to add streaming aggregation you need to completely change the array element of the remote write. for those who are using a values.yaml override, that creates a need to hard code the url in all environments. for the default one we can maybe create an "additionalStreaminAggregations" value or something of the sort. |
I don't think it's possible to delegate streamAggr configuration to the scrapping definition, because that configuration is not configured and applied per scrapping job at vmagent. It also unclear, how to merge conflicting configuration. For instance, VMServiceScrape-1 has the following config:
VMServiceScrape-2 has the following config:
Even if match could be changed from It doesn't look like good approach to me. Also, it requires from users to have a knowledge of other streaming aggregation configuration. |
Is your feature request related to a problem? Please describe
Having CRDs to scrape different services is great, as we can have on each microservice repository a folder, for instance, /monitoring, where developers can have their
vmservicescrapes
CRDs that are later deployed together with the service in K8s and read by vmagent, hence start the scrape of each new service.The problem is that, if the developer wants to reduce cardinality of the metrics scraped with some Streaming Aggregation config, right now the only way to do it is by changing the vmagent deploy to add in a single file all the streaming aggregation configs with an arg, like
This stops the developers to control their own metrics and leaves the team in charge of the vmagent deploy to maintain and "gatekeep" all the configuration regarding all the services in a company in a single (and possibly massive) file.
Describe the solution you'd like
The same way we have CRDs for
vmnodescrapes
vmpodscrapes
andvmservicescrapes
, we should be able to deployvmstreamaggrconfigs
.vmagent can then read the CRDs and apply the configs the same way is doing with the scrape configs.
Describe alternatives you've considered
We created a separate repository where the developers can drop files with their stream aggregation config files, then the CI merges all the files into a single one that is deployed as a ConfigMap in Kubernetes and mounted in a dir with an specific filename where, by default, vmagent is reading with
-remoteWrite.streamAggr.config=/etc/vm/stream-aggr-configs/stream-aggr-configs.config
.This doesn't really solve the issue but at least mitigates it so developers doesn't have to do changes in the vm k8s operator code.
We still have to gatekeep the code and will have a massive file sooner than later.
Additional information
An "easy" solution will be applying a similar approach that VM already have with servicescrapes
The text was updated successfully, but these errors were encountered: