Commit Graph

53 Commits

Author SHA1 Message Date
Robert Nemeti
0f76dc63b6 add serviceMonitorNamespaceSelector to the prometheus jsonnet library
to implement the feature from PR #1227
2018-08-06 07:38:26 +00:00
Vasilis Remmas
d009846be9 Create rolebinding using $._config.namespace
Assign the rolebinding to an existing serviceaccount
2018-08-02 10:59:34 +02:00
prune
facf7cc0e1 minor update as requested in PR 2018-08-01 07:35:28 -04:00
prune
fc382e15cd allow creation of role and rolebindings for other namespaces in jsonnet
replaced default namespaces rbac rules by a loop


set right variable name
2018-07-27 07:48:17 -04:00
Frederic Branczyk
9a011bb8ac kube-prometheus: Use locking mechanism for jsonnet dependencies 2018-07-25 17:21:50 +02:00
Mark Eijsermans
cf6232c479 adjust rbac apiGroups to support core workloads api apps/v1 2018-07-24 18:05:16 -07:00
Ali Rizwan
d728ab5511 Only alert for nodes that currently exist (#1661) 2018-07-23 12:20:54 +02:00
seph
596b8697d0 Set default scrape values
We default to a 30s scrapeInterval, we may as well also set scrapeTimeout to the same.
2018-07-17 10:24:10 -04:00
seph
358c8477ea Resource config now in config.kubeStateMetrics
As requested, this updates the resource specification to live directly in config.kubeStateMetrics

It also clarifies the config variables. These names are what google uses in some of their tooling.

(And a slight tweak to the way collectors are specified)
2018-07-17 09:59:48 -04:00
seph
b6e7d708c5 Configure kube-state-metrics
As I work with kube-state-metrics in a large cluster, I found I needed to make some adjustments.

- Expose the collectors, allowing one to configure exclusions. 

- Expose the addon_resizer parameters, facilitating reproduce adjustments

- Allow adjusting scrapeTimeout and scrapeInterval
2018-07-17 00:40:47 -04:00
Frederic Branczyk
ad748858e3 kube-prometheus: Add kube-prometheus mixin to configure static etcd 2018-07-03 15:57:48 +02:00
Frederic Branczyk
6312998080 kube-prometheus: Bump various versions 2018-06-25 13:48:36 +02:00
Max Leonard Inden
603771ff14 kube-prometheus: Run node-exporter in host network
Node exporter needs to run in the host network, not in the pod network
in order to pick up network metrics of the node.
2018-06-15 11:47:51 +02:00
Frederic Branczyk
3446f3cf25 Merge pull request #1466 from brancz/dashboard-cms
kube-prometheus: Use 1 ConfigMap per Grafana dashboard
2018-06-12 11:52:25 +02:00
Frederic Branczyk
f81bdd8928 kube-prometheus: Use 1 ConfigMap per Grafana dashboard 2018-06-12 10:02:11 +02:00
Frederic Branczyk
30b84794d7 Merge pull request #1433 from atopuzov/ignore_etc_files
NodeDiskRunningFull ignore etc files mountpoints
2018-06-11 15:44:39 +02:00
Frederic Branczyk
62fa823e3e kube-prometheus: Add docs on how to set Alertmanager configuration 2018-06-07 11:53:37 +02:00
Frederic Branczyk
502044ff93 *: Use all jsonnet from master branch 2018-06-07 10:04:05 +02:00
Frederic Branczyk
1d5623d4a0 kube-prometheus: Extract prometheus-operator jsonnet out of contrib 2018-06-06 18:01:32 +02:00
Aleksandar Topuzovic
64c73eafe5 Ignore '/etc/*' mountpoints
* Ignores '/etc/resolv.conf', '/etc/hosts' and '/etc/hostname' mountpoints
* Otherwise 3 additional alerts are generated
2018-06-05 14:59:40 +01: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
6f6d7dcdc9 support custom kube-prometheus configmapReloader & prometheusConfigReloader image 2018-05-31 18:55:13 +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
Matthias Loibl
23cd630d33 Change the roleBinding and rules names too 2018-05-25 22:46:58 +02:00
Matthias Loibl
da6fc256b5 Make the prometheus & alertmanager name configurable 2018-05-25 18:02:23 +02:00
Frederic Branczyk
d8f6b6f81b kube-prometheus: Update kops docs 2018-05-25 15:54:54 +02:00
Joshua Olson
3bd7d36abd add the watch verb (to the namespace apiGroup for the prometheus-operator ClusterRole).
To get the "Failed to watch" error to stop happening in the prometheus-operator logs.

Fixes #1324 for kube-prometheus.
2018-05-21 16:18:57 -05:00
Frederic Branczyk
3edf5c5410 Merge pull request #1333 from mxinden/alerting-rule-file-crd
prometheus: Introduce RuleFile Custom Resource Definition
2018-05-18 17:14:28 +02: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
Frederic Branczyk
fef0a65938 Adapt docs on additional rules and dashboards 2018-05-18 11:00:11 +02: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
Frederic Branczyk
8406f8a7a0 Merge pull request #1254 from mxinden/fix-jsonnet-version
kube-prometheus: Remove hard-coded Prometheus Operator version
2018-04-26 13:39:08 +01:00
Max Leonard Inden
157ad7eaea kube-prometheus: Update Prometheus Operator version before generating 2018-04-26 12:50:51 +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
0610c45e13 kube-prometheus: Fix rule label selector 2018-04-22 10:50:58 +01:00
Frederic Branczyk
7c07940cb8 kube-prometheus: Fix config reloader RBAC 2018-04-22 10:50:26 +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