Skip to content

Commit

Permalink
Merge pull request #13 from s-urbaniak/openshift-master
Browse files Browse the repository at this point in the history
merge upstream changes
  • Loading branch information
openshift-merge-robot committed Dec 5, 2018
2 parents c4a666f + 81b4644 commit 508fd28
Show file tree
Hide file tree
Showing 1,101 changed files with 110,095 additions and 21,830 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sudo: required
language: go
go:
- "1.10"
- "1.11"
services:
- docker
before_install:
Expand All @@ -11,7 +11,7 @@ jobs:
include:
- stage: Sanity check and tests
# Check generated contents are up to date and code is formatted.
script: make format generate-in-docker && git diff --exit-code
script: make --always-make format generate-in-docker && git diff --exit-code
- script: cd contrib/kube-prometheus && make test-in-docker
# Build Prometheus Operator rule config map to rule file crds cli tool
- script: cd cmd/po-rule-migration && go install
Expand Down
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,61 @@
## 0.26.0 / 2018-11-30

* [CHANGE] Remove attempting to set "secure" security context (#2109).
* [CHANGE] Remove deprecated StorageSpec fields (#2132).
* [ENHANCEMENT] Better handling for pod/node labels from ServiceMonitors (#2089).
* [ENHANCEMENT] Update to Proemtheus v2.5.0 as default (#2101).
* [ENHANCEMENT] Update to Alertmanager v0.15.3 as default (#2128).
* [ENHANCEMENT] Increase CPU limits for small containers to not being throttled as much (#2144).
* [BUGFIX] Sanitize thanos secret volume mount name (#2159).
* [BUGFIX] Fix racy Kubernetes multi watch (#2177).

## 0.25.0 / 2018-10-24

* [FEATURE] Allow passing additional alert relabel configs in Prometheus custom resource (#2022)
* [FEATURE] Add ability to mount custom ConfigMaps into Alertmanager and Prometheus (#2028)

## 0.24.0 / 2018-10-11

This release has a breaking changes for `prometheus_operator_.*` metrics.

`prometheus_operator_alertmanager_reconcile_errors_total` and `prometheus_operator_prometheus_reconcile_errors_total`
are now combined and called `prometheus_operator_reconcile_errors_total`.
Instead the metric has a "controller" label which indicates the errors from the Prometheus or Alertmanager controller.

The same happened with `prometheus_operator_alertmanager_spec_replicas` and `prometheus_operator_prometheus_spec_replicas`
which is now called `prometheus_operator_spec_replicas` and also has the "controller" label.

The `prometheus_operator_triggered_total` metric now has a "controller" label as well and finally instruments the
Alertmanager controller.

For a full description see: https://github.com/coreos/prometheus-operator/pull/1984#issue-221139702

In order to support multiple namespaces, the `--namespace` flag changed to `--namespaces`
and accepts and comma-separated list of namespaces as a string.

* [CHANGE] Default to Node Exporter v0.16.0 (#1812)
* [CHANGE] Update to Go 1.11 (#1855)
* [CHANGE] Default to Prometheus v2.4.3 (#1929) (#1983)
* [CHANGE] Default to Thanos v0.1.0 (#1954)
* [CHANGE] Overhaul metrics while adding triggerBy metric for Alertmanager (#1984)
* [CHANGE] Add multi namespace support (#1813)
* [FEATURE] Add SHA field to Prometheus, Alertmanager and Thanos for images (#1847) (#1854)
* [FEATURE] Add configuration for priority class to be assigned to Pods (#1875)
* [FEATURE] Configure sampleLimit per ServiceMonitor (#1895)
* [FEATURE] Add additionalPeers to Alertmanager (#1878)
* [FEATURE] Add podTargetLabels to ServiceMonitors (#1880)
* [FEATURE] Relabel target name for Pods (#1896)
* [FEATURE] Allow configuration of relabel_configs per ServiceMonitor (#1879)
* [FEATURE] Add illegal update reconciliation by deleting StatefulSet (#1931)
* [ENHANCEMENT] Set Thanos cluster and grpc ip from pod.ip (#1836)
* [BUGFIX] Add square brackets around pod IPs for IPv6 support (#1881)
* [BUGFIX] Allow periods in secret name (#1907)
* [BUGFIX] Add BearerToken in generateRemoteReadConfig (#1956)

## 0.23.2 / 2018-08-23

* [BUGFIX] Do not abort kubelet endpoints update due to nodes without IP addresses defined (#1816)

## 0.23.1 / 2018-08-13

* [BUGFIX] Fix high CPU usage of Prometheus Operator when annotating Prometheus resource (#1785)
Expand Down
74 changes: 74 additions & 0 deletions Documentation/additional-scrape-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Additional Scrape Configuration

AdditionalScrapeConfigs allows specifying a key of a Secret containing
additional Prometheus scrape configurations. Scrape configurations specified
are appended to the configurations generated by the Prometheus Operator.

Job configurations specified must have the form as specified in the official
[Prometheus documentation](
https://prometheus.io/docs/prometheus/latest/configuration/configuration/#<scrape_config>).
As scrape configs are appended, the user is responsible to make sure it is
valid. *Note* that using this feature may expose the possibility to break
upgrades of Prometheus.

It is advised to review Prometheus release notes to ensure that no incompatible
scrape configs are going to break Prometheus after the upgrade.

## Creating an additional configuration

First, you will need to create the additional configuration.
Below we are making a simple "prometheus" config. Name this
`prometheus-additional.yaml` or something similiar.

```
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]
```

Then you will need to make a secret out of this configuration.

```
kubectl create secret generic additional-scrape-configs --from-file=prometheus-additional.yaml --dry-run -oyaml > additional-scrape-configs.yaml
```

Next, create a new secret using the base64 encoded output as the value for
`prometheus-additional.yaml` in the secret.

```
apiVersion: v1
data:
prometheus-additional.yaml: LSBqb2JfbmFtZTogInByb21ldGhldXMiCiAgc3RhdGljX2NvbmZpZ3M6CiAgLSB0YXJnZXRzOiBbImxvY2FsaG9zdDo5MDkwIl0K
kind: Secret
metadata:
creationTimestamp: null
name: additional-scrape-configs
```

Finally, reference this additional configuration in your `prometheus.yaml` CRD.

```
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
name: prometheus
labels:
prometheus: prometheus
spec:
replicas: 2
serviceAccountName: prometheus
serviceMonitorSelector:
matchLabels:
team: frontend
additionalScrapeConfigs:
name: additional-scrape-configs
key: prometheus-additional.yaml
...
```

NOTE: Use only one secret for ALL additional scrape configurations.

## Additional References

* [Prometheus Spec](https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec)
* [Additional Scrape Configs](https://github.com/coreos/prometheus-operator/tree/master/example/additional-scrape-configs)
Loading

0 comments on commit 508fd28

Please sign in to comment.