Commit Graph

218 Commits

Author SHA1 Message Date
Frederic Branczyk
62fa823e3e kube-prometheus: Add docs on how to set Alertmanager configuration 2018-06-07 11:53:37 +02:00
Frederic Branczyk
1d5623d4a0 kube-prometheus: Extract prometheus-operator jsonnet out of contrib 2018-06-06 18:01:32 +02:00
Max Leonard Inden
c13b0556ba *: Bump version to v0.20.0 2018-06-05 15:07:17 +02:00
Frederic Branczyk
9b4f6ce56b *: Remove PrometheusRuleSelector 2018-06-05 13:59:31 +02:00
Frederic Branczyk
e84b101fe7 *: Rename RuleFile to PrometheusRule 2018-06-05 13:34:13 +02:00
Max Leonard Inden
8f3b505049 kube-prometheus: Adjust to new Prometheus rule file CRD
89fc4e306972604eba2dcb961a6d29cc27a668ad introduced the new Prometheus
rule file custom resource definition. This patch adjusts the
kube-prometheus project to use the new custom resource definition.
2018-06-04 20:23:02 +02:00
Frederic Branczyk
b7d0da01d5 kube-prometheus: Remove unnecessary namespace selectors 2018-05-31 17:37:43 +02:00
Frederic Branczyk
10bbf403fe Merge pull request #1404 from mxinden/rm-tpr
rbac: Remove Third Party Resources rules
2018-05-31 15:40:36 +02:00
Max Leonard Inden
553d6b0c63 rbac: Remove Third Party Resources rules
Since PR 460 [1] the Prometheus Operator is using Kubernetes Custom Resource
Definitions instead of Kubernetes Third Party Resources. Permissions to
handle Third Party Resources in the RBAC rules of the Prometheus
Operator is thereby obsolete.

[1] https://github.com/coreos/prometheus-operator/pull/460
2018-05-31 15:12:15 +02:00
slene
49c76ac80f update generated kube-prometheus manifests 2018-05-31 18:59:44 +08:00
Frederic Branczyk
4ba6995481 Merge pull request #1399 from mxinden/rule-file-live-migration
prometheus: Enable live migration of rule configmaps to rule file crds
2018-05-31 11:47:55 +02:00
Max Leonard Inden
453e170f6a prometheus: Enable live migration of rule configmaps to rule file crds
With this patch the Prometheus Operator checks if there are any
Kubernetes ConfigMaps inside the Prometheus namespace which fullfill the
`Spec.RuleSelector` requirement. If so, it creates a RuleFile for each
key in the `ConfigMap.Spec.Data` map inside the Prometheus namespace.
2018-05-31 10:47:50 +02:00
Frederic Branczyk
b405326bfc Merge pull request #1386 from nickman/master
Adds proxy_url to v1.Endpoint. Fixes #1385
2018-05-30 14:17:24 +02:00
Nicholas Whitehead
7eee585cdf Adds proxy_url to v1.Endpoint. Fixes #1385 2018-05-30 05:20:21 -04:00
Frederic Branczyk
64db049d3a kube-prometheus: Migrate kube-prometheus alerts to jsonnet 2018-05-29 11:06:59 +02:00
Frederic Branczyk
c11db46863 kube-prometheus: Re-generate 2018-05-25 17:01:41 +02:00
Joshua Olson
3605c0eb44 Also checking in the changes made to prometheus-rules.yaml by "make generate", in order to (hopefully) get the build to be green. 2018-05-24 16:53:32 -05:00
Joshua Olson
2b81c0090b After modifying prometheus-operator.libsonnet (see commit ec19c16), these are the changes that were made to 0prometheus-operator-clusterRole.yaml by running "make generate". 2018-05-24 16:35:19 -05:00
Max Leonard Inden
9e180452f8 prometheus: Introduce RuleFile Custom Resource Definition
This patch introduces a new Custom Resource Definition to the
Prometheus Operator - the Rule CRD. It addresses two main
needs:

1. Prometheus (alerting and recording) Rule validation during creation time
via Kubernetes Custom Resource Definition validation.

2. Life-cycle management of Prometheus application Rules alongside the
application itself, inside the applications Kubernetes namespace, not
necessarily the namespace of the scraping Prometheus instance.

A user defines Prometheus alerting and recording Rules via a Kubernetes
Custom Resource Definition. These Custom Resource Definitions can be
fully validated by the Kubernetes API server during creation time via
automatically generated OpenAPI specifications. Instead of the
restriction of a Prometheus instance to only select Rule definitions
inside its own namespace, the Prometheus specification is extended to
also specify namespaces to look for Rule Custom Resource Definitions
outside its own namespace.

---

Dependent technical changes:

- prometheus: Use github.com/jimmidyson/configmap-reload to reload rules

- prometheus: Remove Prometheus Statefulset deletion function. Starting
with K8s >=1.8 this is handled via OwnerReferences.

- prometheus: Do not add rule files checksum to Prometheus configuration
secret

- prometheus: Update StatefulSet only on relevant changes. Instead of
updating the Prometheus StatefulSet on every `sync()` run, only update
it if the input parameters to `makeStatefulSet` change.  Enforce this
via a checksum of the parameters which is saved inside the annotations
of the statefulset.

- e2e/prometheus: Check how often resources (Secret, ConfigMap,
Prometheus CRD, Service) are updated to enforce that Prometheus Operator
only updated created resources if necessary.

- contrib/prometheus-config-reloader: Remove logic to retriev K8s
ConfigMaps. These are mounted into the pod right away now.
2018-05-18 16:27:20 +02:00
Giancarlo Rubio
2a6b3db38b Fix CI running make generate (#1327) 2018-05-10 17:50:14 +02:00
Frederic Branczyk
116aaf88be kube-prometheus: regenerate 2018-05-08 07:36:13 -07:00
Frederic Branczyk
3388f96afe Address comments 2018-05-06 08:29:52 -07:00
Frederic Branczyk
edf21e4382 kube-prometheus/jsonnet: Use jsonnet-bundler 2018-04-28 19:05:19 +01:00
Max Leonard Inden
992bcdccc1 *: Bump version to v0.19.0 2018-04-26 21:42:57 +02:00
Brandon Dimcheff
45076a6a1f kube-prometheus: fix addon-resizer role binding
The addon resizer was referring to an incorrect role binding and was unable to
access the API.  This changes the rolebinding name to refer to the correctly
defined rolebinding.
2018-04-25 22:05:56 -04:00
Frederic Branczyk
2afaeab294 kube-prometheus: Update to latest kubernetes-grafana 2018-04-22 16:37:13 +01:00
Max Inden
26d1dc86c9 Merge pull request #1229 from mxinden/move-serv-mon-to-target
kube-prometheus: Move service monitors to target folder
2018-04-18 14:15:26 +02:00
Max Leonard Inden
971ed1010e kube-prometheus: Move service monitors to target folder
With 1d00e0ab ("ServiceMonitor: Enable Prometheus to select ServMon
outside own ns") merged: To emphasize the fact, that ServiceMonitors can
be deployed alongside their targets, this patch moves the Alertmanager,
Kube-State-Metrics, Node-Exporter and Prometheus Operator
Service-Monitor into the respective target folder in the kube-prometheus
project.
2018-04-18 13:44:45 +02:00
Joakim Karlsson
00df72cf5e cleanup 2018-04-18 11:20:45 +02:00
Joakim Karlsson
e3e5105699 added rbac permissions for operator to work properly 2018-04-18 11:15:18 +02:00
Frederic Branczyk
507617e150 Remove old manifests and replace with jsonnet build 2018-04-13 13:36:34 +02:00
Frederic Branczyk
0d142fe9da Merge pull request #1205 from zuzzas/cpu-rules
Fixed CPU accounting in recording rules
2018-04-11 15:08:15 +02:00
Arslanbekov Denis
a2d273b11a In description is displayed correctly namespace (#1190)
* in description is displayed correctly namespace

* Bump kube state version

* Update Chart.yaml
2018-04-10 17:18:24 +02:00
Andrey Klimentyev
f9b03ddd9d kube-prometheus: fixed CPU accounting
Currently, node recording rules feature
an incorrect idle CPU accounting. This
change aims to fix that.
2018-04-10 15:14:48 +03:00
Max Leonard Inden
b10e343689 kube-prometheus: Fix minor typo 2018-04-10 10:27:54 +02:00
Frederic Branczyk
63ae4ee19e Merge pull request #1200 from coreos/release-0.18
Cut 0.18.1 back to master
2018-04-09 18:32:57 +02:00
Max Leonard Inden
46c49616e0 *: Bump version to v0.18.1 2018-04-09 14:47:34 +02:00
Richard Maynard
889eca2cd4 charts: Add Core DNS Support (#1176)
* charts: Add Core DNS Support

With CoreDNS becoming a first class citizen it should be an optional part
of the kube-prometheus deployment.

Fixes: #1174

* added kube-prometheus service and service monitor

In order to work directly with a cluster created by bootkube used port 9153,
and created a service exposing metrics since bootkube does does not. Also in
the helm chart changed the default port to 9153 since that is the coredns
plugins default port and to be consistent throughout the repo.
2018-04-05 09:57:56 +02:00
Frederic Branczyk
b566db5d4b *: Bump version to v0.18.0 2018-04-04 10:06:38 +02:00
Sébastien GLON
2c10f81102 Add new alert for samples rejected due ti duplicate timestamp (#1148)
Signed-off-by: Sébastien GLON <sebastien.glon@akeneo.com>
2018-03-26 18:11:40 +02:00
Frederic Branczyk
22513e0475 Merge pull request #1145 from brancz/targetlabels
prometheus: Add ability to whitelist Kubernetes labels
2018-03-26 05:49:39 -04:00
Michael Pietzsch
e50adc0926 Grafana Update to 5.0.3 (#1149) 2018-03-26 05:25:41 -04:00
Frederic Branczyk
3246c48913 prometheus: Add ability to whitelist Kubernetes labels 2018-03-23 16:13:28 +01:00
Alexander Holte-Davidsen
4c77a9db1d Update Alert Manager rules for NodeDiskRunningFull with summary 2018-03-22 11:32:38 +01:00
Frederic Branczyk
07263e98c0 *: upgrade client-go 2018-03-21 14:24:45 +01:00
Frederic Branczyk
3c278a202f Merge branch 'master' into restrict-service-monitor 2018-03-20 08:47:43 -04:00
Max Leonard Inden
310f471cf6 contrib/kube: Add rbac role to discover prometheus
The current example-app setup in the kube-prometheus project is able to
discover scraping targets in the default namespace. It is not able to
discover the configured Alertmanager in the monitoring namespace.

This patch adds an alertmanager-discovery rbac role, to permit the
above described action. In addition it does the following cleanups:

- Remove kubeconfig configuration in deploy and teardown script. kubectl
chooses .kube/config whenever KUBECONFIG is not set by default

- Remove namespace specification option via NAMESPACE env var. In most
of the manifests the metadata/namespace was hardcoded anyways, in
addition in the promtheus frontend role binding the service account
namespace is hardcoded to default as well.

- Instead of `kubectl {apply,delete}` individual manifests, the deploy
and teardown shell scripts {apply,delete} on the entire folder.
2018-03-19 17:13:33 +01:00
Max Leonard Inden
2f302943fe Unify rule file label accross repository
In some cases we have been using `alert-rules` in some cases
`prometheus-rulefiles`. This led to confusion [1]. Instead, unify the
Prometheus rules configmap labels to:

```yaml
labels:
  role: alert-rules
```

[1] https://github.com/coreos/prometheus-operator/issues/1102
2018-03-19 14:24:48 +01:00
Max Leonard Inden
3a6d38ea0e contrib/kube: Restrict example-app servicemonitor to default ns
The `prometheus-frontend` role of the example app kubeprometheus section
is scoped to the default namespace. Thereby the frontend Prometheus
instance is not able to discover anything outside of the default
namespace. We might as well restrict the front end service monitor to
the default namespace too.
2018-03-19 13:34:18 +01:00
Laurent Godet
0bda22e380 Update Prometheus to 2.2.1 2018-03-14 19:34:35 +00:00