refactor: allow Thanos rules to be evaluated within Prometheus when Thanos isn't used
Preparatory refactor for #70 (closed) and https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/team/-/issues/327.
At present Saturation Rules are exclusively evaluated in either Prometheus OR Thanos, but not both.
This fits with the architecture of GitLab.com, where we are running both Prometheus and Thanos.
In reference architectures, this will not be the case as there will be no Thanos.
This means that for those architectures, we need to support the option for running the Thanos rules in Prometheus.
This yakshave change doesn't affect any YAML configuration, but changes the API for the Saturation generation methods to support this option.
generateSaturationRules
method:
Configurations options for the - Prometheus on GitLab.com:
includePrometheusEvaluated=true
,includeDangerouslyThanosEvaluated=false
- Thanos on GitLab.com:
includePrometheusEvaluated=false
,includeDangerouslyThanosEvaluated=true
(opposite of Prometheus) - Prometheus on Reference Architecture:
includePrometheusEvaluated=true
,includeDangerouslyThanosEvaluated=true
(include all rules in Prometheus)
Edited by Andrew Newdigate