-
Notifications
You must be signed in to change notification settings - Fork 354
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
Rule patching can use index to distinguish alert / record rules under the same name #1331
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: raptorsun The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Another PR with this rule patching function has been created in prometheus-operator/kube-prometheus repository, too. |
678bfd1
to
9cdc6bd
Compare
9cdc6bd
to
6a4cf14
Compare
@raptorsun: PR needs rebase. Instructions 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. |
@raptorsun: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions 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. I understand the commands that are listed here. |
Since we don't need this now in CMO, it would be better to add this functionality in kube-prometheus and bring it to CMO by reusing the upstream jsonnet script, wdyt? |
Totally agree, I will close this PR, and use this PR in kube-prometheus to add this functionality instead. |
The function patchOrExcludeRule uses an additional field "index" to distinguish different rules under the same name (alert/record field is considered as its name). Rules under the same group are ordered by alphabetic order in output.
For example, the following patch will add the field "patch:'A1' to the second rule of "alert:'A'".