[stable/prometheus-operator] Fix conditions in the default rule templates#19335
Conversation
|
Hi @vasrem. Thanks for your PR. I'm waiting for a helm member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
| - alert: PrometheusRemoteWriteDesiredShards | ||
| annotations: | ||
| description: Prometheus {{`{{$labels.namespace}}`}}/{{`{{$labels.pod}}`}} remote write desired shards calculation wants to run {{`{{ printf $value }}`}} shards, which is more than the max of {{print `{{ printf ` "`" `prometheus_remote_storage_shards_max{instance="%s",job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}` "`" ` $labels.instance | query | first | value }}`}}. | ||
| description: Prometheus {{`{{$labels.namespace}}`}}/{{`{{$labels.pod}}`}} remote write desired shards calculation wants to run {{`{{ $value }}`}} shards, which is more than the max of {{`{{ printf `prometheus_remote_storage_shards_max{instance="%s",job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}` $labels.instance | query | first | value }}`}}. |
There was a problem hiding this comment.
This is unrelated to this PR and it breaks yaml linting in CI. The problem is already present in master. I am going to revert this small change here.
Signed-off-by: Vasilis Remmas <vasremm@gmail.com>
Signed-off-by: Vasilis Remmas <vasremm@gmail.com>
Signed-off-by: Vasilis Remmas <vasremm@gmail.com>
Signed-off-by: Vasilis Remmas <vasremm@gmail.com>
7abc530 to
8504f1c
Compare
|
/assign @gianrubio |
|
/ok-to-test |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vasrem, vsliouniaev The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…ates (helm#19335) * Add more groups to address corner cases Signed-off-by: Vasilis Remmas <vasremm@gmail.com> * Run sync_prometheus_rules.py Signed-off-by: Vasilis Remmas <vasremm@gmail.com> * Bump chart version Signed-off-by: Vasilis Remmas <vasremm@gmail.com> * Revert unrelated change Signed-off-by: Vasilis Remmas <vasremm@gmail.com>
…ates (helm#19335) * Add more groups to address corner cases Signed-off-by: Vasilis Remmas <vasremm@gmail.com> * Run sync_prometheus_rules.py Signed-off-by: Vasilis Remmas <vasremm@gmail.com> * Bump chart version Signed-off-by: Vasilis Remmas <vasremm@gmail.com> * Revert unrelated change Signed-off-by: Vasilis Remmas <vasremm@gmail.com>
…ates (helm#19335) * Add more groups to address corner cases Signed-off-by: Vasilis Remmas <vasremm@gmail.com> * Run sync_prometheus_rules.py Signed-off-by: Vasilis Remmas <vasremm@gmail.com> * Bump chart version Signed-off-by: Vasilis Remmas <vasremm@gmail.com> * Revert unrelated change Signed-off-by: Vasilis Remmas <vasremm@gmail.com> Signed-off-by: Artur <artur@upbound.io>
Is this a new chart
No
What this PR does / why we need it:
Fixes 2 known issues. Currently, it's impossible to opt out of some default rules because the conditions in the templates are generated incorrectly. The flags which were affected were:
prometheus.defaultRules.rules.kubernetesSystemprometheus.defaultRules.rules.prometheusThis PR addresses the handling of the edge cases, since the groups were renamed in 1.14. It addresses them by adding more entries to handle both cases.
Which issue this PR fixes
(optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close that issue when PR gets merged)Special notes for your reviewer:
I decided not to introduce different chart values and keep the interface the same since the handling is getting even more complex. Please provide feedback if it's needed to proceed this way.
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
[stable/mychartname])