Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/prometheus-operator] Re-sync prometheus rules and grafana dashboards #21248

Merged
merged 19 commits into from
Apr 2, 2020
Merged

[stable/prometheus-operator] Re-sync prometheus rules and grafana dashboards #21248

merged 19 commits into from
Apr 2, 2020

Conversation

iuriaranda
Copy link
Contributor

@iuriaranda iuriaranda commented Mar 4, 2020

What this PR does / why we need it

Re-sync the prometheus rules and grafana dashboards.

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • DCO signed
  • Chart Version bumped
  • Variables are documented in the README.md
  • Title of the PR starts with chart name (e.g. [stable/mychartname])

Signed-off-by: iuri aranda <[email protected]>
@helm-bot helm-bot added Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 4, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @iuriaranda. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 4, 2020
@vsliouniaev
Copy link
Collaborator

/ok-to-test
/lgtm

@k8s-ci-robot k8s-ci-robot added ok-to-test lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 4, 2020
@iuriaranda
Copy link
Contributor Author

Yeah I still have to resolve that linting error somehow. The problem is that they've introduced a special notation in a prometheus rule upstream (here), and it's giving issues when translated to a Helm template.

I'm still figuring out how to fix it, we either change that notation upstream in the kube-prometheus repo or we figure out how to escape a backtick (`) in a helm command.

I see that this was previously manually fixed as well, so I kept it like before

Signed-off-by: iuri aranda <[email protected]>
@k8s-ci-robot k8s-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Mar 5, 2020
@iuriaranda
Copy link
Contributor Author

@vsliouniaev Can you review again please? I've fixed the linting error and merged from master.

@vsliouniaev
Copy link
Collaborator

The sync scripts produce a different output than what is in your PR

@vsliouniaev
Copy link
Collaborator

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 6, 2020
@iuriaranda
Copy link
Contributor Author

The sync scripts produce a different output than what is in your PR

Indeed, it's about the notation of the PrometheusRemoteWriteDesiredShards alert. The upstream alert description uses a backtick character that gets enclosed inside a {{`...`}} block in Helm by the sync script. So it ends up transformed to something like this:

{{`{{ printf `prometheus_remote_storage_shards_max...` }}`}}

Everything inside the outer {{`...`}} should be interpreted literal by Helm, so after Helm rendering should end up like {{ printf `prometheus_remote_storage_shards_max...` }}. But of course the inside backticks are breaking the Helm interpolation.

I've seen that this has been manually fixed in previous syncs like this, so that's what I did this time:

{{print `{{ printf ` "`" `prometheus_remote_storage_shards_max` "`" `}}`}}

I don't think this can easily be incorporated into the sync script so it automatically transforms such expressions. So IMO we either modify the expression upstream in the prometheus mixin or we accept a manual change.

Any other ideas?

@iuriaranda
Copy link
Contributor Author

@vsliouniaev Have you seen my previous comment? How do you propose to proceed?

@vsliouniaev
Copy link
Collaborator

I've seen that this has been manually fixed in previous syncs like this

Sounds like the scripts need to be updated to take care of this

@iuriaranda
Copy link
Contributor Author

Sounds like the scripts need to be updated to take care of this

@vsliouniaev that would be great. Do you have any ideas on how to do that? I can't think of any regex or method that can perform this kind of transformation.

@helm-bot helm-bot removed the Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). label Mar 10, 2020
This should fix the issue of having a backtick (`) inside a {{ ... }} command block in prometheus syntax.

As per #21248 (comment)

Signed-off-by: iuri aranda <[email protected]>
@vsliouniaev
Copy link
Collaborator

/lgtm

@vsliouniaev
Copy link
Collaborator

/retest

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 19, 2020
@iuriaranda
Copy link
Contributor Author

Apparently tests are failing again, same problem as the other day. @unguiculus could you check the test cluster again please?
Thanks!

@davidham
Copy link

There is a change in the current rules-1.14/k8s.rules.yaml from coreos/kube-prometheus that will fix a PrometheusRuleFailures issue in prometheus-operator, anything I can do to help get this merged?

@iuriaranda
Copy link
Contributor Author

@davidham well, apparently the test environment is not fully cleaned up sometimes, and the tests fail systematically. We can't really proceed until somebody fixes the test cluster.

cc @vsliouniaev @unguiculus

@davidham the change in the rules you mention, is it already included in this PR? Or should I re-sync the rules again?

@iuriaranda
Copy link
Contributor Author

/retest

1 similar comment
@unguiculus
Copy link
Member

/retest

@iuriaranda iuriaranda changed the title [stable/prometheus-operator] Re-sync prometheus rules [stable/prometheus-operator] Re-sync prometheus rules and grafana dashboards Mar 31, 2020
@k8s-ci-robot k8s-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Mar 31, 2020
@helm-bot helm-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 31, 2020
@iuriaranda
Copy link
Contributor Author

/retest

@iuriaranda
Copy link
Contributor Author

Finally all tests are green and PR is up to date with the latest changes from master 🎉

Now it only needs the lgtm label again 😛

@vsliouniaev can you review again please?

@vsliouniaev
Copy link
Collaborator

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 2, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: iuriaranda, vsliouniaev

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 62ae4a3 into helm:master Apr 2, 2020
@iuriaranda iuriaranda deleted the update-rules branch April 2, 2020 13:53
irlevesque pushed a commit to quantopian/charts that referenced this pull request Jul 13, 2020
…hboards (helm#21248)

* Re-sync prometheus rules

Signed-off-by: iuri aranda <[email protected]>

* Manually fix special notiation in prometheus rules

I see that this was previously manually fixed as well, so I kept it like before

Signed-off-by: iuri aranda <[email protected]>

* Bump chart version

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version

Signed-off-by: iuri aranda <[email protected]>

* Fix Helm interpolation escaping in sync scripts

This should fix the issue of having a backtick (`) inside a {{ ... }} command block in prometheus syntax.

As per helm#21248 (comment)

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version

Signed-off-by: iuri aranda <[email protected]>

* Remove unnecessary whitespace

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version

Signed-off-by: iuri aranda <[email protected]>

* Bump prometheus-operator chart patch version

Signed-off-by: iuri aranda <[email protected]>

* Update prometheus rules gain

Signed-off-by: iuri aranda <[email protected]>

* Sync grafana dashboards as well

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version for prometheus-operator chart

Signed-off-by: iuri aranda <[email protected]>
includerandom pushed a commit to includerandom/helm_charts that referenced this pull request Jul 19, 2020
…hboards (helm#21248)

* Re-sync prometheus rules

Signed-off-by: iuri aranda <[email protected]>

* Manually fix special notiation in prometheus rules

I see that this was previously manually fixed as well, so I kept it like before

Signed-off-by: iuri aranda <[email protected]>

* Bump chart version

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version

Signed-off-by: iuri aranda <[email protected]>

* Fix Helm interpolation escaping in sync scripts

This should fix the issue of having a backtick (`) inside a {{ ... }} command block in prometheus syntax.

As per helm#21248 (comment)

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version

Signed-off-by: iuri aranda <[email protected]>

* Remove unnecessary whitespace

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version

Signed-off-by: iuri aranda <[email protected]>

* Bump prometheus-operator chart patch version

Signed-off-by: iuri aranda <[email protected]>

* Update prometheus rules gain

Signed-off-by: iuri aranda <[email protected]>

* Sync grafana dashboards as well

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version for prometheus-operator chart

Signed-off-by: iuri aranda <[email protected]>
li-adrienloiseau pushed a commit to li-adrienloiseau/charts that referenced this pull request Jul 29, 2020
…hboards (helm#21248)

* Re-sync prometheus rules

Signed-off-by: iuri aranda <[email protected]>

* Manually fix special notiation in prometheus rules

I see that this was previously manually fixed as well, so I kept it like before

Signed-off-by: iuri aranda <[email protected]>

* Bump chart version

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version

Signed-off-by: iuri aranda <[email protected]>

* Fix Helm interpolation escaping in sync scripts

This should fix the issue of having a backtick (`) inside a {{ ... }} command block in prometheus syntax.

As per helm#21248 (comment)

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version

Signed-off-by: iuri aranda <[email protected]>

* Remove unnecessary whitespace

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version

Signed-off-by: iuri aranda <[email protected]>

* Bump prometheus-operator chart patch version

Signed-off-by: iuri aranda <[email protected]>

* Update prometheus rules gain

Signed-off-by: iuri aranda <[email protected]>

* Sync grafana dashboards as well

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version for prometheus-operator chart

Signed-off-by: iuri aranda <[email protected]>
Signed-off-by: Adrien Loiseau <[email protected]>
scottrigby pushed a commit to prometheus-community/helm-charts that referenced this pull request Aug 8, 2020
…hboards (#21248)

* Re-sync prometheus rules

Signed-off-by: iuri aranda <[email protected]>

* Manually fix special notiation in prometheus rules

I see that this was previously manually fixed as well, so I kept it like before

Signed-off-by: iuri aranda <[email protected]>

* Bump chart version

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version

Signed-off-by: iuri aranda <[email protected]>

* Fix Helm interpolation escaping in sync scripts

This should fix the issue of having a backtick (`) inside a {{ ... }} command block in prometheus syntax.

As per helm/charts#21248 (comment)

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version

Signed-off-by: iuri aranda <[email protected]>

* Remove unnecessary whitespace

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version

Signed-off-by: iuri aranda <[email protected]>

* Bump prometheus-operator chart patch version

Signed-off-by: iuri aranda <[email protected]>

* Update prometheus rules gain

Signed-off-by: iuri aranda <[email protected]>

* Sync grafana dashboards as well

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version for prometheus-operator chart

Signed-off-by: iuri aranda <[email protected]>
endrec pushed a commit to Rungway/charts-we-use that referenced this pull request Aug 14, 2020
…hboards (#21248)

* Re-sync prometheus rules

Signed-off-by: iuri aranda <[email protected]>

* Manually fix special notiation in prometheus rules

I see that this was previously manually fixed as well, so I kept it like before

Signed-off-by: iuri aranda <[email protected]>

* Bump chart version

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version

Signed-off-by: iuri aranda <[email protected]>

* Fix Helm interpolation escaping in sync scripts

This should fix the issue of having a backtick (`) inside a {{ ... }} command block in prometheus syntax.

As per helm/charts#21248 (comment)

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version

Signed-off-by: iuri aranda <[email protected]>

* Remove unnecessary whitespace

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version

Signed-off-by: iuri aranda <[email protected]>

* Bump prometheus-operator chart patch version

Signed-off-by: iuri aranda <[email protected]>

* Update prometheus rules gain

Signed-off-by: iuri aranda <[email protected]>

* Sync grafana dashboards as well

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version for prometheus-operator chart

Signed-off-by: iuri aranda <[email protected]>
mmingorance-dh pushed a commit to mmingorance-dh/charts that referenced this pull request Aug 28, 2020
…hboards (helm#21248)

* Re-sync prometheus rules

Signed-off-by: iuri aranda <[email protected]>

* Manually fix special notiation in prometheus rules

I see that this was previously manually fixed as well, so I kept it like before

Signed-off-by: iuri aranda <[email protected]>

* Bump chart version

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version

Signed-off-by: iuri aranda <[email protected]>

* Fix Helm interpolation escaping in sync scripts

This should fix the issue of having a backtick (`) inside a {{ ... }} command block in prometheus syntax.

As per helm#21248 (comment)

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version

Signed-off-by: iuri aranda <[email protected]>

* Remove unnecessary whitespace

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version

Signed-off-by: iuri aranda <[email protected]>

* Bump prometheus-operator chart patch version

Signed-off-by: iuri aranda <[email protected]>

* Update prometheus rules gain

Signed-off-by: iuri aranda <[email protected]>

* Sync grafana dashboards as well

Signed-off-by: iuri aranda <[email protected]>

* Bump patch version for prometheus-operator chart

Signed-off-by: iuri aranda <[email protected]>
Signed-off-by: Miguel Mingorance <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). lgtm Indicates that a PR is ready to be merged. ok-to-test size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants