Skip to content

jsonnet: create a monitoring mixin for prometheus-operator - #3333

Merged
paulfantom merged 4 commits into
prometheus-operator:masterfrom
paulfantom:mixin
Aug 18, 2020
Merged

paulfantom merged 4 commits into
prometheus-operator:masterfrom
paulfantom:mixin

Conversation

@paulfantom

Copy link
Copy Markdown
Member

Convert
https://github.com/coreos/kube-prometheus/blob/master/jsonnet/kube-prometheus/alerts/prometheus-operator.libsonnet
into a prometheus-operator monitoring mixin

If we want this, I will add some tooling to make it testable.

/cc @coreos/team-monitoring

@lilic

lilic commented Jul 20, 2020

Copy link
Copy Markdown
Contributor

Come to think about it we already have kube-prometheus, which we need to bump anyways with each release of prometheus operator so not sure what problem this would solve besides introducing another dependency for users. Happy to convinced otherwise if there are benefits.

@paulfantom

Copy link
Copy Markdown
Member Author

It is not about us, but about the broader community. Not everyone is using kube-prometheus.

@lilic

lilic commented Jul 21, 2020

Copy link
Copy Markdown
Contributor

But they can use the mixin in the same way no from kube-prometheus as well as from prometheus operator?

@simonpasquier

Copy link
Copy Markdown
Contributor

One advantage I see having the mixin in the operator repository is that it's easier to keep in sync with the operator code (e.g. when you add a new metric, you can add the alert).

@brancz

brancz commented Jul 22, 2020

Copy link
Copy Markdown
Contributor

Right now kube-prometheus and prometheus-operator are often viewed as the same project, so I don't really mind this, but I also don't think it's very important right now. Once #3273 is done, we should certainly move ahead with this, but I think it might be more productive to focus on that first.

@paulfantom
paulfantom requested a review from a team as a code owner August 15, 2020 12:37
@paulfantom
paulfantom requested review from simonpasquier and removed request for a team August 15, 2020 12:37
@paulfantom

Copy link
Copy Markdown
Member Author

Updated to conform to monitoring mixins guidelines.

Changed directory structure to align with other mixins.

Added examples/mixin/alerts.yaml target to Makefile. Now alerts are regenerated with every make generate execution. This allows for the basic jsonnet code evaluation test.

This is no longer WIP and all blockers were removed. Ready for review.

@paulfantom paulfantom changed the title WIP: jsonnet: create a monitoring mixin for prometheus-operator jsonnet: create a monitoring mixin for prometheus-operator Aug 15, 2020
@s-urbaniak

Copy link
Copy Markdown
Contributor

lgtm, we should just make sure these are also sourced in kube-prometheus, aka the place we migrated it from.

@simonpasquier simonpasquier left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@paulfantom
paulfantom merged commit 0b2321d into prometheus-operator:master Aug 18, 2020
@paulfantom
paulfantom deleted the mixin branch August 18, 2020 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants