1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-16 01:06:27 +00:00
Commit graph

118 commits

Author SHA1 Message Date
Tamal Saha
39306eb830 Update client libraries to Kubernetes 1.11 2018-07-01 09:23:00 -07:00
Frederic Branczyk
24f98e7df9 Remote write queue config (#1517)
RemoteWriteSpec Expose QueueConfig Parameters (#1488)
2018-06-26 22:03:02 +08:00
Frederic Branczyk
84350d2c56
*: Add Thanos integration 2018-06-22 15:49:02 +02:00
Frederic Branczyk
f07d73bd1e
*: Remove PrometheusRuleSelector 2018-06-05 13:59:31 +02:00
Frederic Branczyk
fb32e57837
*: Rename RuleFile to PrometheusRule 2018-06-05 13:34:13 +02:00
Dan Mace
8b8a247072 Fix conversion of Prometheus timestamp fields
Fix a conversion issue which prevents updates to Prometheus resource timestamp
fields where the timestamp is a.) a value type and b.) a read-only API field
(i.e. creationTimestamp).
2018-06-04 16:36:15 -04:00
Frederic Branczyk
6ed99e1b75
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
afe9711ce2
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
Nicholas Whitehead
3963aaa114 Adds proxy_url to v1.Endpoint. Fixes #1385 2018-05-30 05:20:21 -04:00
Max Leonard Inden
89fc4e3069
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
jakub.coufal
af37c3a7c1 prometheus: add additional AlertManager config - generated code 2018-05-11 22:32:44 +02:00
jakub.coufal
7a813d6dae prometheus: add additional AlertManager config 2018-05-11 22:32:05 +02:00
Max Inden
2c07b8d74d
Merge pull request #1278 from brancz/all-namespaces
prometheus: Allow all selector for namespaces
2018-05-07 11:19:17 +02:00
Frederic Branczyk
7d023c2cb5
prometheus: Allow all selector for namespaces 2018-05-06 09:04:06 -07:00
tamal
0b9724a4e0 Update client libraries to Kubernetes 1.10 2018-05-05 09:43:40 -07:00
Max Leonard Inden
433406488f
Revert "Merge pull request #1100 from metalmatze/staticconfigs"
This reverts commit 3533e1c22f, reversing
changes made to 0ae7f5ddf9.

With the _additional-scrape-config_ feature via Kubernetes secrets, the
_static-configs_ feature in Service Monitors is redundant. This patch
reverts the latter one.
2018-04-25 16:02:53 +02:00
Max Leonard Inden
ab13af9628
Revert "Merge pull request #1194 from metalmatze/statictargets-fix"
This reverts commit 7c84fdb17d, reversing
changes made to fa10f2751c.

With the _additional-scrape-config_ feature via Kubernetes secrets, the
_static-configs_ feature in Service Monitors is redundant. This patch
reverts the latter one.
2018-04-25 16:02:40 +02:00
Frederic Branczyk
e45f7653a7
Merge pull request #1246 from mxinden/additional-config
prometheus: Allow specifying additional scrape configs via secret
2018-04-24 21:56:54 +01:00
Max Leonard Inden
c39b1e14ec
prometheus: Add test for additional scrape configs & update docs 2018-04-24 11:31:57 +02:00
Frederic Branczyk
b403afdffe
prometheus: Allow specifying additional scrape configs via secret 2018-04-18 11:25:01 +02:00
Max Leonard Inden
1d00e0ab4b
ServiceMonitor: Enable Prometheus to select ServMon outside own ns
So far a Prometheus object could only select ServiceMonitors inside its
own namespace. This patch enables a Prometheus object to select
ServiceMonitors outside its own namespace via the
`ServiceMonitorNamespaceSelector` field in the Prometheus spec.

Use case: There is one Prometheus inside the `monitoring` namespace,
which is supposed to monitor applications across namespaces for an
entire Kubernetes cluster.  Each app team is supposed to manage its own
ServiceMonitors. Instead of granting each app team access to the
`monitoring` namespace to manage its ServiceMonitor objects,
ServiceMonitors can be shipped along with the application itself in each
application namespace.
2018-04-18 10:36:54 +02:00
Keyvan Hedayati
5a113987f6 Fixed typos in RemoteReadSpec comments 2018-04-12 16:44:43 +04:30
Matthias Loibl
d8bcab8d70
Add experimental to comment for StaticTargets 2018-04-09 12:27:42 +02:00
Max Leonard Inden
51daf7711b
Make AM log level configurable 2018-04-07 16:27:00 +02:00
Matthias Loibl
83f233ae32
Simplify ServiceMonitor to simply use StaticTargets 2018-04-05 20:25:39 +02:00
Matthias Loibl
1780729b5a
Add StaticConfigs to ServiceMonitors 2018-04-05 19:31:10 +02:00
Frederic Branczyk
cc7ecdd8c7
prometheus: Make relabeling fields optional 2018-04-03 11:26:18 +02:00
Frederic Branczyk
f6f259a9ca
Merge pull request #1145 from brancz/targetlabels
prometheus: Add ability to whitelist Kubernetes labels
2018-03-26 05:49:39 -04:00
Frederic Branczyk
2d53e51de0
alertmanager: Allows specifying additional secrets 2018-03-23 16:16:46 +01:00
Frederic Branczyk
06c8308952
prometheus: Add ability to whitelist Kubernetes labels 2018-03-23 16:13:28 +01:00
Frederic Branczyk
b9f35ff546
Merge pull request #1122 from mxinden/support-am-0.15
Support Alertmanager v0.15.0
2018-03-22 04:14:19 -04:00
Frederic Branczyk
d819104e38
*: upgrade client-go 2018-03-21 14:24:45 +01:00
Max Leonard Inden
713dd05438
Support Alertmanager v0.15.0
With Alertmanager v0.15.0 the HA command line flag prefix changes from
"mesh" to "cluster" and peer ports need to be specified. This patch
enables running Alertmanager v0.15.0 with the Prometheus operator
without breaking backward compatibility.

In addition it does the following refactoring:

- Instead of generating the stateful set for an old AM version, and then
addressing all necessary changes up to the newest version, generate an
up to date stateful set version and address any changes necessary for
backward compatibility.

- Add unit tests for the various flag changes in between Alertmanager
version.

- Add v0.15.0 mesh initialization test
2018-03-21 12:47:57 +01:00
Frederic Branczyk
2ae5b72e37
prometheus: Add ability to authenticate with bearer token from file 2018-03-19 09:46:50 +01:00
Jason Piper
e1f98921d0 Add v1.TLSConfig to AlertManagerEndpoints 2018-03-17 17:02:30 +08:00
Jason Piper
434aa8c468 insecureSkipVerify for alertmanager connections 2018-03-16 12:49:45 +08:00
crandl201
03a41b9940 prometheus: remote configuration - add read_recent and required matchers, change naming of proxy_url in CRD 2018-03-12 21:28:18 -04:00
Frederic Branczyk
ca15e870da
*: Allow listening locally and specifying additional containers 2018-03-10 17:05:00 +01:00
Frederic Branczyk
12b94fc54f
client: Fix validation for AlertingSpec 2018-03-09 13:58:32 +01:00
Alexander Dobriakov
67ed5b20b5 documentation: clarify _RelabelConfig_ usage
The _RelabelConfig_ is confusing and connotes, that it is about
`<relabel_config>`-section of the configuration, but in reality it is about
`<metric_relabel_configs>`-section.

Comment in `types.go` was changed and `make generate` run to update generated documentation.
2018-03-02 15:13:16 +01:00
Antoine Legrand
200e68175a Update validation spec 2018-02-16 09:10:01 +01:00
Antoine Legrand
e61a163047 Update openapi-gen 2018-01-30 15:33:39 +01:00
Antoine Legrand
9d7d753a55 Factorize the NewCustomCRD function 2018-01-30 15:30:00 +01:00
Antoine Legrand
33bf31dc08 Vendor the crd-validation packages 2018-01-30 15:29:57 +01:00
Antoine Legrand
d727d03c0c Update License header to 2018 2018-01-30 15:29:56 +01:00
Antoine Legrand
2e1e1a4c01 Fix prometheus types generation 2018-01-30 15:29:56 +01:00
Antoine Legrand
348fd1636f Generate CRD Validation spec 2018-01-30 15:29:56 +01:00
Antoine Legrand
982f24c22e Add option to include Validation Spec to CRDs 2018-01-30 15:29:56 +01:00
Frederic Branczyk
b783d08bf2
*: Use non-root 2018-01-23 16:14:17 +01:00
Zack Brenton
1263b927d4 Support dropping metrics at scrape time (#843)
* added skipMetrics field to servicemonitor

* generating drop metric relabelings from skipMetrics config

* added servicemonitor with skipMetrics config to promcfg unit test

* format tests

* update docs

* generate deepcopy methods

* use relabel object for metric relabel configs

* fix relabel config typos in remote write config

* update generated content

* updated docs
2018-01-11 15:17:06 +01:00