Compare commits

..

1513 Commits

Author SHA1 Message Date
Prometheus Operator Bot
62e133d2ce [bot] [main] Automated version update 2024-09-23 10:13:36 +00:00
dependabot[bot]
0cd78a9d1c build(deps): bump github.com/prometheus/client_golang (#2520)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.3 to 1.20.4.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.20.3...v1.20.4)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-23 11:09:24 +01:00
dependabot[bot]
b20433ed10 build(deps): bump k8s.io/client-go from 0.31.0 to 0.31.1 (#2517)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.31.0 to 0.31.1.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.31.0...v0.31.1)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-16 15:11:33 +00:00
dependabot[bot]
da9b2d3bf5 build(deps): bump k8s.io/apimachinery from 0.31.0 to 0.31.1 (#2518)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.31.0 to 0.31.1.
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.31.0...v0.31.1)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-16 16:02:39 +01:00
PromOperatorBot
f390f53274 [bot] [main] Automated version update (#2519)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-09-16 16:02:25 +01:00
Philip Gough
bc0f49d6f8 chore: Unpin deps for 0.14.0 and re-generate (#2515) 2024-09-12 11:21:19 +01:00
Philip Gough
e02554298c Release v0.14.0 (#2513)
* chore: Pin version and generate manifests for 0.14.0

* docs: Add 0.14.0 changelog
2024-09-12 08:45:55 +01:00
Philip Gough
d65feabf3e chore: Prep for 0.14.0 release (#2514)
* chore: Prep for 0.14 release in docs and ci

* chore: Update kubeconform versions

* chore: Update to pyrra v0.7 for add-on

* chore: Drop deprecated apiserver_flowcontrol_request_concurrency_in_use metric
2024-09-11 17:00:01 +01:00
dependabot[bot]
68bd41ff10 build(deps): bump github.com/yannh/kubeconform in /scripts (#2471)
Bumps [github.com/yannh/kubeconform](https://github.com/yannh/kubeconform) from 0.6.4 to 0.6.7.
- [Release notes](https://github.com/yannh/kubeconform/releases)
- [Changelog](https://github.com/yannh/kubeconform/blob/master/.goreleaser.yml)
- [Commits](https://github.com/yannh/kubeconform/compare/v0.6.4...v0.6.7)

---
updated-dependencies:
- dependency-name: github.com/yannh/kubeconform
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-11 11:00:34 +01:00
dependabot[bot]
6e45488c15 build(deps): bump github.com/jsonnet-bundler/jsonnet-bundler in /scripts (#2493)
Bumps [github.com/jsonnet-bundler/jsonnet-bundler](https://github.com/jsonnet-bundler/jsonnet-bundler) from 0.5.1 to 0.6.0.
- [Release notes](https://github.com/jsonnet-bundler/jsonnet-bundler/releases)
- [Changelog](https://github.com/jsonnet-bundler/jsonnet-bundler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsonnet-bundler/jsonnet-bundler/compare/v0.5.1...v0.6.0)

---
updated-dependencies:
- dependency-name: github.com/jsonnet-bundler/jsonnet-bundler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-11 10:52:47 +01:00
Philip Gough
c51a481eb5 chore: Update go version and k8s deps (#2512) 2024-09-11 10:52:27 +01:00
PromOperatorBot
ddb3d03393 [bot] [main] Automated version update (#2511)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-09-11 10:25:45 +01:00
Cyril Jouve
3fecdadf15 add monitor and rules resources to user-facing roles (#2238)
in cluster with separation between (cluster) admin and (namespaced)
users, it allows the namespaced users to create monitor and rules in
their namespaces according to the default k8s model of user-facing
roles.

ref: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
2024-09-11 10:22:05 +01:00
Philip Gough
1deaee53f0 ci: Update Go version and removes 0.10 release from strategy (#2510) 2024-09-11 10:18:03 +01:00
Philip Gough
74cadfed37 docs: Update release doc/schedule info (#2508) 2024-09-10 10:27:17 +01:00
Philip Gough
1d5dec22b9 Bump to latest k8s versions in ci workflow (#2507)
* Bump to latest k8s versions in ci workflow

* Drop deprecated api server metric

https://github.com/kubernetes/kubernetes/pull/118959

* test: Extend time for poll for ksm replicas
2024-09-10 10:12:25 +01:00
Peter Becich
bbabb7956a remove $ symbol in shell examples to copy quickly (#2506) 2024-09-09 11:41:14 +01:00
dependabot[bot]
d83ef2ac95 build(deps): bump github.com/prometheus/client_golang (#2503)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.0 to 1.20.3.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.20.3/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.20.0...v1.20.3)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-09 10:50:23 +01:00
Damien Grisonnet
eb7f83a407 Drop process start time from SLI endpoints (#2501)
* jsonnet: drop process start time metric from SLI

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>

* manifests: regenerate

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>

---------

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2024-09-05 08:45:00 +01:00
dependabot[bot]
97368beb47 build(deps): bump peter-evans/create-pull-request from 6 to 7 (#2499)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 6 to 7.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v6...v7)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-04 09:51:28 +01:00
PromOperatorBot
74e445ae4a [bot] [main] Automated version update (#2498)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-09-02 09:12:47 +01:00
Jayapriya Pai
d04c1e140a Merge pull request #2496 from dgrisonnet/sli-metrics
Add Kubernetes components SLI metrics
2024-08-28 10:48:46 +05:30
Damien Grisonnet
89f1ee2c21 manifests: regenerate
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2024-08-27 21:48:53 +02:00
Damien Grisonnet
43f2094629 jsonnet: add component SLI metrics
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2024-08-27 21:48:38 +02:00
PromOperatorBot
5d0365589e [bot] [main] Automated version update (#2494)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-08-26 11:54:08 +01:00
dependabot[bot]
dad42856b8 build(deps): bump github.com/prometheus/client_golang (#2488)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.19.1 to 1.20.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.19.1...v1.20.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-20 09:32:45 +01:00
PromOperatorBot
55bde930c4 [bot] [main] Automated version update (#2489)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-08-20 09:32:27 +01:00
PromOperatorBot
74f4e0cda3 [bot] [main] Automated version update (#2484)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-08-12 10:46:12 +01:00
Marian Chelmus
33c43a4067 Fix link in access-ui (#2483)
This CR is fixing the broken link to documentation on how to expose Prometheus/Alertmanager/Grafana via Ingress
2024-08-08 14:32:49 +00:00
PromOperatorBot
d20a4b2926 [bot] [main] Automated version update (#2482)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-08-07 16:29:59 +00:00
PromOperatorBot
03d90a10cd [bot] [main] Automated version update (#2476)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-08-07 13:58:38 +01:00
Philip Gough
67df60d1c0 Version update (#2474) 2024-08-07 12:59:58 +01:00
Ashwin Sriram
defa2bd1e2 Modified Access-UI Page for Website (#2455) 2024-07-16 09:04:15 -03:00
PromOperatorBot
d141b7cc9a [bot] [main] Automated version update (#2451)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-07-08 18:29:23 +01:00
PromOperatorBot
b5b59bc0b4 [bot] [main] Automated version update (#2449)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-06-24 10:47:03 +01:00
PromOperatorBot
2a42427283 [bot] [main] Automated version update (#2447)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-06-17 09:04:36 +01:00
dependabot[bot]
03604b7336 build(deps): bump github.com/prometheus/client_golang (#2420)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.19.0 to 1.19.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.19.0...v1.19.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-17 09:04:25 +01:00
PromOperatorBot
eddb948ce3 [bot] [main] Automated version update (#2443)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-06-12 09:07:09 +01:00
dependabot[bot]
616f59155c build(deps): bump golang.org/x/net from 0.20.0 to 0.23.0 (#2407)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.20.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.20.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-04 15:14:45 +01:00
dependabot[bot]
0845950f53 build(deps): bump golang.org/x/net from 0.17.0 to 0.23.0 in /scripts (#2406)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.17.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.17.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-04 09:33:51 +01:00
dependabot[bot]
9f28d1b8ef build(deps): bump helm/kind-action from 1.9.0 to 1.10.0 (#2410)
Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 09:30:02 +01:00
PromOperatorBot
a5fd6f24dc [bot] [main] Automated version update (#2438)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-06-03 09:29:41 +01:00
Raúl Garcia Sanchez
d3fa80ee96 Get latest version by tag if no release exists (#2435)
* get latest version by tag if no release exisits

Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>

* fix generate diff-check

Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>

---------

Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
2024-05-30 09:43:18 +01:00
PromOperatorBot
1965e0d8bf [bot] [main] Automated version update (#2436)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-05-30 09:41:50 +01:00
Kemal Akkoyun
65922b9fd8 Merge pull request #2434 from slashpai/chore
chore: add CODEOWNERS file
2024-05-24 15:48:10 +02:00
Kemal Akkoyun
1c54cb22ca Merge pull request #2427 from philipgough/ci-fix-ksm
ci: Add runAsGroup for kube-state-metrics
2024-05-24 11:32:55 +02:00
Kemal Akkoyun
01c0e7d130 Merge pull request #2428 from philipgough/ci-fix-prom
ci: Add runAsGroup for prom operator Deployment
2024-05-24 11:32:41 +02:00
Jayapriya Pai
9f8192fd53 chore: add CODEOWNERS file
Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
2024-05-22 18:18:32 +05:30
PromOperatorBot
c523c26a33 [bot] [main] Automated version update (#2432)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-05-20 09:57:23 +01:00
Philip Gough
e8f461ba38 ci: Add runAsGroup for prom operator Deployment 2024-05-14 10:04:07 +01:00
Philip Gough
387731a945 ci: Add runAsGroup for kube-state-metrics 2024-05-14 09:31:24 +01:00
Kemal Akkoyun
cb55161e24 Merge pull request #2423 from philipgough/ci-fix-grafana 2024-05-13 12:07:04 +02:00
Kemal Akkoyun
e3afd46d5c Merge pull request #2424 from philipgough/ci-fix-ne 2024-05-13 12:06:43 +02:00
Philip Gough
e8995efcf9 ci: Add runAsGroup for node_exporter sidecars 2024-05-13 10:40:04 +01:00
Philip Gough
d0b0b0d087 ci: Add runAsGroup for Grafana Deployment 2024-05-13 10:34:58 +01:00
Kemal Akkoyun
2147ea0079 Merge pull request #2422 from philipgough/ci-fix
ci: Add runAsGroup for blackbox exporter containers
2024-05-13 11:33:53 +02:00
Philip Gough
d1ec0ab362 ci: Add runAsGroup for blackbox exporter containers 2024-05-13 09:20:00 +01:00
PromOperatorBot
2a07e4579e [bot] [main] Automated version update (#2408)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-05-13 08:58:32 +01:00
Sarah Conway
71e8adada9 Add blackbox-exporter to included components list (#2412)
This is clearly available within `manifests/`, but isn't listed in the README. Including this now for clear communication of what can be expected using this package.
2024-04-30 14:42:35 +01:00
Kemal Akkoyun
407142589d Merge pull request #2396 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2024-04-15 14:28:53 +02:00
Prometheus Operator Bot
1bfad012f0 [bot] [main] Automated version update 2024-04-15 07:40:12 +00:00
Kemal Akkoyun
f752c172f1 Merge pull request #2383 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2024-04-13 00:07:56 +02:00
Kemal Akkoyun
60846825fa Add missing dependency
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2024-04-13 00:00:57 +02:00
Prometheus Operator Bot
d9abf29bb9 [bot] [main] Automated version update 2024-04-08 07:40:26 +00:00
dependabot[bot]
76f2e1ef95 build(deps): bump k8s.io/client-go from 0.29.2 to 0.29.3 (#2374)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.29.2 to 0.29.3.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.29.2...v0.29.3)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 11:04:27 +00:00
dependabot[bot]
6ca9dc12cc build(deps): bump github.com/docker/docker in /scripts (#2378)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 24.0.7+incompatible to 24.0.9+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v24.0.7...v24.0.9)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 11:04:07 +00:00
dependabot[bot]
c95980afdd build(deps): bump k8s.io/apimachinery from 0.29.2 to 0.29.3 (#2375)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.29.2 to 0.29.3.
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.29.2...v0.29.3)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-20 16:44:38 +00:00
dependabot[bot]
73db4bedf5 build(deps): bump google.golang.org/protobuf from 1.32.0 to 1.33.0 (#2370)
Bumps google.golang.org/protobuf from 1.32.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-20 10:55:53 +00:00
dependabot[bot]
6c4fb7e2d1 build(deps): bump google.golang.org/protobuf in /scripts (#2369)
Bumps google.golang.org/protobuf from 1.30.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-20 10:55:03 +00:00
PromOperatorBot
02cfa4227a [bot] [main] Automated version update (#2367)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-03-20 10:54:33 +00:00
PromOperatorBot
942b7f5a7b [bot] [main] Automated version update (#2357)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-03-06 09:57:58 +00:00
dependabot[bot]
8afbcdbbd1 build(deps): bump github.com/prometheus/client_golang (#2360)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.18.0 to 1.19.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.19.0/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.18.0...v1.19.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-06 09:57:20 +00:00
dependabot[bot]
a8ba97a150 build(deps): bump peter-evans/create-pull-request from 5 to 6 (#2341)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 5 to 6.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v5...v6)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-21 12:11:35 +00:00
PromOperatorBot
0a7d68f3ee [bot] [main] Automated version update (#2353)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-02-19 09:33:38 +00:00
dependabot[bot]
e48db63312 build(deps): bump k8s.io/client-go from 0.29.1 to 0.29.2 (#2351)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.29.1 to 0.29.2.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.29.1...v0.29.2)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 10:15:06 +00:00
dependabot[bot]
9859d57b58 build(deps): bump helm/kind-action from 1.8.0 to 1.9.0 (#2347)
Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.8.0 to 1.9.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.8.0...v1.9.0)

---
updated-dependencies:
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 10:14:53 +00:00
PromOperatorBot
09e003ecc5 [bot] [main] Automated version update (#2344)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-02-16 10:14:07 +00:00
Simon Pasquier
361bc43774 chore: ignore mdox errors for https://www.weave.works (#2348)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2024-02-13 10:25:00 +00:00
PromOperatorBot
58b07aac5d [bot] [main] Automated version update (#2339)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-01-30 16:04:17 +00:00
dependabot[bot]
b960170f5f build(deps): bump k8s.io/client-go from 0.29.0 to 0.29.1 (#2336)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.29.0 to 0.29.1.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.29.0...v0.29.1)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-29 11:19:53 +00:00
PromOperatorBot
ed15614b0a [bot] [main] Automated version update (#2337)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-01-22 09:12:43 +00:00
dependabot[bot]
484c3c0d04 build(deps): bump k8s.io/apimachinery from 0.29.0 to 0.29.1 (#2335)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.29.0 to 0.29.1.
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.29.0...v0.29.1)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-19 14:53:17 +00:00
Brad Ison
895db2a272 jsonnet/components/prometheus: Fix thanos-sidecar metrics access (#2330)
When enabled, the thanos-sidecar opens an HTTP listener on port 10902,
which what's used to scrape metrics.  This port wasn't being added to
the Prometheus Service, so wasn't added to the NetworkPolicy causing
scraping to fail from Prometheus instances other than the local one.

This adds the port to the Service and NetworkPolicy.

Fixes: #2006
2024-01-15 09:16:17 +00:00
PromOperatorBot
56b1a48a46 [bot] [main] Automated version update (#2331)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-01-15 09:02:22 +00:00
PromOperatorBot
e7fa2f0b3c [bot] [main] Automated version update (#2324)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-01-08 12:12:16 +00:00
dependabot[bot]
dbc615a769 build(deps): bump github.com/prometheus/client_golang (#2319)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.17.0...v1.18.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-03 17:31:25 +00:00
PromOperatorBot
5fcbcc9198 [bot] [main] Automated version update (#2317)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2024-01-03 17:24:42 +00:00
dependabot[bot]
6d2c95d9d4 build(deps): bump golang.org/x/crypto from 0.14.0 to 0.17.0 in /scripts (#2311)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-03 17:21:28 +00:00
Philip Gough
8e5bfc511b Add exception for PromOperator's twitter profile (#2321) 2024-01-03 17:14:21 +00:00
PromOperatorBot
0cf56a9fb6 [bot] [main] Automated version update (#2310)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-12-18 09:38:14 +00:00
dependabot[bot]
de4c742c02 build(deps): bump k8s.io/client-go from 0.28.4 to 0.29.0 (#2308)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.28.4 to 0.29.0.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.28.4...v0.29.0)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-15 16:56:20 +00:00
dependabot[bot]
566a522860 build(deps): bump k8s.io/apimachinery from 0.28.4 to 0.29.0 (#2307)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.28.4 to 0.29.0.
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.28.4...v0.29.0)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-15 16:01:44 +00:00
dependabot[bot]
d56049292d build(deps): bump actions/setup-go from 4 to 5 (#2299)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 10:05:52 +00:00
dependabot[bot]
f3e50b8f14 build(deps): bump actions/stale from 8 to 9 (#2302)
Bumps [actions/stale](https://github.com/actions/stale) from 8 to 9.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v8...v9)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 10:05:37 +00:00
PromOperatorBot
61b7be09f7 [bot] [main] Automated version update (#2304)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-12-11 10:05:21 +00:00
PromOperatorBot
035b09f424 [bot] [main] Automated version update (#2295)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-12-01 17:05:07 +00:00
Damien Grisonnet
2799245471 script/generate-versions: fix versions sort (#2294)
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2023-12-01 16:45:51 +00:00
Austin Hoppe
80ab54b66a jsonnet: migrate from deprectaed kube-state-metrics usage (#2269)
Use new form for deprecated metric.

To fix #2264
2023-11-27 12:23:19 +00:00
dependabot[bot]
a53753b3c0 build(deps): bump k8s.io/client-go from 0.28.2 to 0.28.4 (#2271)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.28.2 to 0.28.4.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.28.2...v0.28.4)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-27 12:09:09 +00:00
dependabot[bot]
e694da52f1 build(deps): bump github.com/yannh/kubeconform in /scripts (#2282)
Bumps [github.com/yannh/kubeconform](https://github.com/yannh/kubeconform) from 0.6.3 to 0.6.4.
- [Release notes](https://github.com/yannh/kubeconform/releases)
- [Changelog](https://github.com/yannh/kubeconform/blob/master/.goreleaser.yml)
- [Commits](https://github.com/yannh/kubeconform/compare/v0.6.3...v0.6.4)

---
updated-dependencies:
- dependency-name: github.com/yannh/kubeconform
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-27 12:08:55 +00:00
PromOperatorBot
6e5c6959cf [bot] [main] Automated version update (#2291)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-11-27 12:08:20 +00:00
PromOperatorBot
0fe6411003 [bot] [main] Automated version update (#2280)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-11-20 09:18:10 +00:00
Simon Pasquier
205aadce96 Merge pull request #2268 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2023-11-14 16:05:44 +01:00
Prometheus Operator Bot
a37a366214 [bot] [main] Automated version update 2023-11-14 14:19:28 +00:00
PromOperatorBot
5e2890efc0 [bot] [main] Automated version update (#2265)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-11-13 10:25:25 +00:00
PromOperatorBot
ddff48cd49 [bot] [main] Automated version update (#2262)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-11-07 17:26:40 +00:00
Marco Lehmann
ad86a3fa21 Patch 2 (#2259)
* Update node-exporter.libsonnet

* Update windows-hostprocess.libsonnet

* Update blackbox-exporter.libsonnet
2023-11-07 17:25:06 +00:00
Adin Hodovic
0126439d08 build: Use sort -n for automated version bumps (#2261)
Signed-off-by: adinhodovic <hodovicadin@gmail.com>
2023-11-07 17:16:12 +00:00
dependabot[bot]
c11e9d9360 build(deps): bump google.golang.org/grpc in /scripts (#2253)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.56.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.53.0...v1.56.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-06 09:22:22 +00:00
PromOperatorBot
3ae2bfabfa [bot] [main] Automated version update (#2260)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-11-06 09:22:05 +00:00
Matthias Loibl
c07f835895 Merge pull request #2256 from prometheus-operator/automated-updates-main 2023-11-01 17:21:19 +01:00
Paweł Krupa
ebd62ed2af Merge pull request #2257 from prometheus-operator/dependabot/go_modules/scripts/github.com/docker/docker-24.0.7incompatible
build(deps): bump github.com/docker/docker from 20.10.24+incompatible to 24.0.7+incompatible in /scripts
2023-11-01 17:10:29 +01:00
Paweł Krupa
8a1a537524 Merge pull request #2252 from m99coder/patch-1
Update kube-state-metrics.libsonnet
2023-11-01 17:08:27 +01:00
Paweł Krupa
8b73d18b76 Merge pull request #2232 from paulfantom/scrape-configs
explicitly enable ScrapeConfig support
2023-11-01 17:00:45 +01:00
dependabot[bot]
c9c321dcbd build(deps): bump github.com/docker/docker in /scripts
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.24+incompatible to 24.0.7+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v20.10.24...v24.0.7)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 15:37:40 +00:00
Prometheus Operator Bot
70c83b5929 [bot] [main] Automated version update 2023-10-30 07:41:49 +00:00
Marco Lehmann
5308081f75 Update kube-state-metrics.libsonnet
Fix typo in error message
2023-10-25 16:20:10 +02:00
dependabot[bot]
b9d1ff5a88 build(deps): bump k8s.io/apimachinery from 0.28.2 to 0.28.3 (#2248)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.28.2 to 0.28.3.
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.28.2...v0.28.3)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 10:24:17 +01:00
PromOperatorBot
a472b19428 [bot] [main] Automated version update (#2250)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-10-23 10:18:51 +01:00
Matthias Loibl
f0986d5488 Merge pull request #2245 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2023-10-19 15:28:47 +02:00
Prometheus Operator Bot
8026584896 [bot] [main] Automated version update 2023-10-16 14:04:39 +00:00
dependabot[bot]
ec217b8cb6 build(deps): bump golang.org/x/net from 0.7.0 to 0.17.0 in /scripts (#2241)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.7.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.7.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-16 14:54:33 +01:00
dependabot[bot]
6fb134834d build(deps): bump golang.org/x/net from 0.13.0 to 0.17.0 (#2240)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.13.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.13.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-16 14:54:11 +01:00
Matthias Loibl
f9ab992172 Merge pull request #2231 from prometheus-operator/pin-pyrra
Pin Pyrra to 0.6.4
2023-10-16 15:37:57 +02:00
Paweł Krupa
8b3b957685 Merge pull request #2237 from Vkshah20/main
Updated the link to prometheus-operator organization
2023-10-10 18:15:17 +02:00
Matthias Loibl
ac1f39f802 Merge pull request #2178 from prometheus-operator/seccomp
Add securityContext items and add pod security labels
2023-10-09 17:30:48 +01:00
Matthias Loibl
fd8436ba88 jsonnetfmt addons/pyrra.libsonnet 2023-10-09 13:02:24 +02:00
Matthias Loibl
cc29fc2bfd run make generate 2023-10-09 13:02:23 +02:00
Matthias Loibl
1e55a4057c Add securityContext items and add pod security labes 2023-10-09 13:02:20 +02:00
Vitrag Shah
b46f71c08a Updated the link to prometheus-operato organization
Fix #2236
2023-10-08 20:43:19 +05:30
paulfantom
ec915f7b47 explicitly enable ScrapeConfig support 2023-10-07 11:09:11 +02:00
Matthias Loibl
9f37007ccc Ping Pyrra to 0.6.4 2023-10-05 15:22:02 +01:00
Matthias Loibl
1706065791 Merge pull request #2228 from prometheus-operator/fix-pyrra-0.6
Pin Pyrra to v0.6
2023-09-30 14:39:21 +02:00
Matthias Loibl
67e4398676 Pin Pyrra to v0.6 2023-09-30 14:00:59 +02:00
dependabot[bot]
98df18a75e build(deps): bump github.com/prometheus/client_golang (#2225)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.17.0/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.16.0...v1.17.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-28 14:24:23 +01:00
PromOperatorBot
8ce7838d24 [bot] [main] Automated version update (#2223)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-09-25 09:02:18 +01:00
dependabot[bot]
250b8745d7 build(deps): bump k8s.io/client-go from 0.28.1 to 0.28.2 (#2220)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.28.1 to 0.28.2.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.28.1...v0.28.2)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-20 11:53:55 +00:00
dependabot[bot]
8e361ab8d0 build(deps): bump k8s.io/apimachinery from 0.28.1 to 0.28.2 (#2219)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.28.1 to 0.28.2.
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.28.1...v0.28.2)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-20 12:43:52 +01:00
PromOperatorBot
b6a6a0b2e8 [bot] [main] Automated version update (#2217)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-09-18 09:54:25 +01:00
Philip Gough
7fafc4cadc Release sync - v0.13.0 (#2215)
* make: Update kubeconform target versions

* docs: Update changelog

* docs: Update release details and matrix

* Update support matrix and ci to include 1.26
2023-09-08 13:54:26 +01:00
Roeland van Batenburg
76ebaeeafe allow configuration of secrets for alertmanager (#2206) 2023-09-06 14:06:29 +01:00
dependabot[bot]
c31bda4a47 build(deps): bump actions/checkout from 3 to 4 (#2212)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 15:22:54 +01:00
PromOperatorBot
e4b70cd932 [bot] [main] Automated version update (#2211)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-09-04 09:35:33 +01:00
Mart Roosmaa
c11655a56d Argo-CD example improvements (#2200)
* Sync ArgoCD example with latest components from example.jsonnet

* Extend the ArgoCD example to include ArgoCD related annotations to make everything work on first try

* Run jsonnetfmt
2023-08-31 22:21:19 +01:00
Philip Gough
fb1f32d8ef Update compatibility matrix to include 1.28 (#2209)
* Update compatibility matrix to include 1.28

* jb update and generate

* drop deprecated metric and generate
2023-08-31 15:30:03 +01:00
Mart Roosmaa
18ed0ffb87 Update ingress docs to have more up to date code examples (#2199)
Closes #2196
2023-08-28 20:40:33 +01:00
hyeongjun Jo
b52efb525e Update customizing.md (#2205) 2023-08-28 19:37:03 +00:00
Simon Pasquier
01d4f1daa6 Remove deprecated 'logtostderr' argument for kube-rbac-proxy (#2198)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-08-28 20:36:39 +01:00
dependabot[bot]
24a7a561c2 build(deps): bump k8s.io/client-go from 0.28.0 to 0.28.1 (#2202)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.28.0 to 0.28.1.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.28.0...v0.28.1)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 19:33:34 +00:00
PromOperatorBot
968cb8fd22 [bot] [main] Automated version update (#2207)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-08-28 20:33:28 +01:00
dependabot[bot]
8c0923dbbb build(deps): bump k8s.io/apimachinery from 0.28.0 to 0.28.1 (#2201)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.28.0 to 0.28.1.
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.28.0...v0.28.1)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 20:25:30 +01:00
Rita Canavarro
84c295f06b [FEAT] Prometheus Adapter reload (#2195)
* [FEAT] Prometheus Adapter reload

Signed-off-by: rita.canavarro <ritinhamcm@gmail.com>

* [FEAT] Prometheus Adapter reload

Signed-off-by: rita.canavarro <ritinhamcm@gmail.com>

---------

Signed-off-by: rita.canavarro <ritinhamcm@gmail.com>
2023-08-23 11:35:10 +01:00
Joseph Daniel
4b5b94347d Fix alertmanager external config example (#1891)
Co-authored-by: Joseph Daniel <joseph@apxor.com>
2023-08-21 10:17:16 +01:00
PromOperatorBot
7e6fe71d93 [bot] [main] Automated version update (#2194)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-08-21 09:47:58 +01:00
Simon Pasquier
01481146a3 Merge pull request #2191 from prometheus-operator/dependabot/github_actions/helm/kind-action-1.8.0
build(deps): bump helm/kind-action from 1.7.0 to 1.8.0
2023-08-17 09:23:51 +02:00
dependabot[bot]
39629e82b3 build(deps): bump helm/kind-action from 1.7.0 to 1.8.0
Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.7.0...v1.8.0)

---
updated-dependencies:
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-16 22:34:17 +00:00
Simon Pasquier
169d92abb2 chore: use helm/kind-action (#2189)
helm/kind-action seems to be more maintained than engineerd/setup-kind.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-08-16 16:55:40 +01:00
Simon Pasquier
e80cc8b01c chore: fix versions action (#2187)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-08-16 16:52:43 +01:00
PromOperatorBot
e59761e447 [bot] [main] Automated version update (#2186)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-08-16 15:22:45 +01:00
dependabot[bot]
2786a46d8a build(deps): bump k8s.io/client-go from 0.27.4 to 0.28.0 (#2183)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.27.4 to 0.28.0.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.27.4...v0.28.0)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-16 14:40:26 +01:00
Simon Pasquier
b102f7b5ce Merge pull request #2185 from simonpasquier/remove-deprecated-arg
prometheus-adapter: remove deprecated argument
2023-08-16 15:21:24 +02:00
Simon Pasquier
535a91cf4c prometheus-adapter: remove deprecated argument
The `--logtostderr` argument has been deprecated in v0.10.0 and removed
in v0.11.0.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-08-16 14:58:40 +02:00
Philip Gough
d539476d5f Update workflow for failing versions update (#2181) 2023-08-14 17:35:05 +01:00
PromOperatorBot
d388980779 [bot] [main] Automated version update (#2170)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-07-24 02:52:34 -07:00
dependabot[bot]
562e714616 build(deps): bump k8s.io/client-go from 0.27.3 to 0.27.4 (#2168)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.27.3 to 0.27.4.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.27.3...v0.27.4)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-21 06:39:12 -07:00
dependabot[bot]
85b5cd38f5 build(deps): bump k8s.io/apimachinery from 0.27.3 to 0.27.4 (#2167)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.27.3 to 0.27.4.
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.27.3...v0.27.4)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-21 06:06:39 -07:00
dependabot[bot]
988d06c81d build(deps): bump github.com/yannh/kubeconform in /scripts (#2165)
Bumps [github.com/yannh/kubeconform](https://github.com/yannh/kubeconform) from 0.6.2 to 0.6.3.
- [Release notes](https://github.com/yannh/kubeconform/releases)
- [Changelog](https://github.com/yannh/kubeconform/blob/master/.goreleaser.yml)
- [Commits](https://github.com/yannh/kubeconform/compare/v0.6.2...v0.6.3)

---
updated-dependencies:
- dependency-name: github.com/yannh/kubeconform
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-18 01:33:16 -07:00
dscho99
c07a8f54b4 chore: fix deprecated github action command (#2163) 2023-07-17 10:39:57 +00:00
Andrew N Golovkov
4068700e27 use names from resources directly (#2135) 2023-07-17 03:31:59 -07:00
PromOperatorBot
f076ce4067 [bot] [main] Automated version update (#2164)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-07-17 03:30:58 -07:00
Brian Torres-Gil
3af1d8320c fix: non-namespaced resources incorrectly have ns (#2158) 2023-07-13 12:22:56 -07:00
dependabot[bot]
d588c9773e build(deps): bump k8s.io/client-go from 0.27.2 to 0.27.3 (#2138)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.27.2 to 0.27.3.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.27.2...v0.27.3)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-10 04:10:42 -07:00
dependabot[bot]
60be33d3c6 build(deps): bump google.golang.org/grpc in /scripts (#2159)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.47.0 to 1.53.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.47.0...v1.53.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-10 04:10:11 -07:00
Matthias Loibl
cea6822e84 Merge pull request #2155 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2023-07-10 12:06:25 +02:00
Prometheus Operator Bot
630e75e6c0 [bot] [main] Automated version update 2023-07-10 07:41:19 +00:00
PromOperatorBot
858a2a53f4 [bot] [main] Automated version update (#2146)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-06-26 08:58:49 +01:00
dependabot[bot]
27a3f25bd9 build(deps): bump github.com/prometheus/client_golang (#2140)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.1 to 1.16.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.15.1...v1.16.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-19 09:59:46 +01:00
PromOperatorBot
148b412e27 [bot] [main] Automated version update (#2143)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-06-19 09:25:42 +01:00
Philip Gough
ba50502da9 ci: Fixes CPU scheduling issues for 1.26 and 1.27 (#2132) 2023-06-12 16:04:31 +01:00
Dinesh Sharma
dc0ad5e216 Addon: Use Hostprocess for Windows Exporter (#2048)
* Addon: Use Hostprocess for Windows Exporter #1627

This allows for Windows Exporter to be deployed and configured
dynamically without requiring to specify targets manually for each
Windows node

Documentation and example added

* Addon: Windows Exporter using Hostprocess

Fix some performance issues.
- Specify resource limits for windows exporter.
- Allow for scrape timeout and interval to be configured. Depending
on how many pods are running on a node it can take from 500ms to 15s
to scrape metrics from node. Default timeout is 10s.
- Allow for enabled collectors to be configured.
- Only enable collectors that are being used in rules and dashboards.

* Addon: Windows Exporter using Hostprocess

Fix formatting issues

* Fix formatting issues in windows-hostprocess addon

* Windows Addon: update doc to reflect both configs
- Hostprocess and static

* Windows Addon: update doc

---------

Co-authored-by: Dinesh Sharma <dinesh.sharma@health.telstra.com>
2023-06-12 09:58:45 +01:00
PromOperatorBot
158cb5422e [bot] [main] Automated version update (#2124)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-06-02 14:20:28 +01:00
dependabot[bot]
26629a4162 build(deps): bump github.com/prometheus/client_golang (#2126)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.14.0 to 1.15.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.14.0...v1.15.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-02 14:19:13 +01:00
Matthias Loibl
a0a23346f6 Merge pull request #2125 from prometheus-operator/pyrra-0.6.3
Update Pyrra to v0.6.3
2023-06-01 16:02:07 +01:00
Matthias Loibl
024eb5c923 Update Pyrra to v0.6.3
I want to deploy that version and rather than doing an overwrite on our end, I thought I might just send the PR through here right away.
2023-06-01 14:56:20 +01:00
Philip Gough
0051df48b8 chore: Update dependencies and test matrix (#2121)
* chore: Bump go version to update k8s deps

* chore: Update test matrix for ci

* docs: Update latest test matrix
2023-06-01 14:19:42 +01:00
Raúl Garcia Sanchez
3fff8b5609 AKS - Create dedicated kubernetes service to expose CoreDNS metrics (#2107)
* create service to expose coredns metrics

Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>

* create service to expose coredns metrics

Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>

---------

Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
2023-05-22 16:29:54 +01:00
Jan-Otto Kröpke
09135ee9b3 Enable Multi Cluster alerts by default (#2099) 2023-05-22 16:26:44 +01:00
PromOperatorBot
5ac666d809 [bot] [main] Automated version update (#2117)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-05-22 09:00:55 +01:00
dependabot[bot]
76d9ce0604 build(deps): bump github.com/yannh/kubeconform in /scripts (#2113)
Bumps [github.com/yannh/kubeconform](https://github.com/yannh/kubeconform) from 0.6.1 to 0.6.2.
- [Release notes](https://github.com/yannh/kubeconform/releases)
- [Changelog](https://github.com/yannh/kubeconform/blob/master/.goreleaser.yml)
- [Commits](https://github.com/yannh/kubeconform/compare/v0.6.1...v0.6.2)

---
updated-dependencies:
- dependency-name: github.com/yannh/kubeconform
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-17 09:00:44 +01:00
dependabot[bot]
b176baa776 build(deps): bump github.com/prometheus/client_golang (#2100)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.0 to 1.15.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.15.0...v1.15.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-15 11:32:47 +01:00
PromOperatorBot
9286a5e7de [bot] [main] Automated version update (#2111)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-05-15 11:32:29 +01:00
PromOperatorBot
c9e1145027 [bot] [main] Automated version update (#2104)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-05-08 08:59:46 +01:00
PromOperatorBot
2a955da550 [bot] [main] Automated version update (#2093)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-05-01 10:21:16 +01:00
dependabot[bot]
6cdfe6ef23 build(deps): bump github.com/docker/docker in /scripts (#2065)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.9+incompatible to 20.10.24+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v20.10.9...v20.10.24)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 15:24:14 +01:00
dependabot[bot]
f3968df630 build(deps): bump peter-evans/create-pull-request from 4 to 5 (#2067)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 4 to 5.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v4...v5)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 15:23:56 +01:00
dependabot[bot]
4a678b13e8 build(deps): bump github.com/prometheus/client_golang (#2076)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.14.0...v1.15.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 15:23:42 +01:00
dependabot[bot]
68b6285fa2 build(deps): bump github.com/google/go-jsonnet in /scripts (#2080)
Bumps [github.com/google/go-jsonnet](https://github.com/google/go-jsonnet) from 0.19.1 to 0.20.0.
- [Release notes](https://github.com/google/go-jsonnet/releases)
- [Changelog](https://github.com/google/go-jsonnet/blob/master/.goreleaser.yml)
- [Commits](https://github.com/google/go-jsonnet/compare/v0.19.1...v0.20.0)

---
updated-dependencies:
- dependency-name: github.com/google/go-jsonnet
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 15:23:26 +01:00
PromOperatorBot
83e60d4588 [bot] [main] Automated version update (#2083)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-04-24 08:59:02 +01:00
Matthias Loibl
18f31ba014 Merge pull request #2074 from adinhodovic/disable-btrfs
fix(component/node-exporter): Disable btrfs collector by default
2023-04-19 11:06:00 +01:00
PromOperatorBot
e619da1b86 [bot] [main] Automated version update (#2079)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-04-17 08:57:48 +01:00
adinhodovic
64ed9f1f44 fix(component/node-exporter): Disable btrfs collector by default 2023-04-13 13:28:18 +02:00
PromOperatorBot
a209d48272 [bot] [main] Automated version update (#2068)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-04-10 09:09:13 +01:00
PromOperatorBot
117ce2f8b5 [bot] [main] Automated version update (#2064)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-04-03 07:47:31 +00:00
PromOperatorBot
b076db6e88 [bot] [main] Automated version update (#2060)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-03-30 10:21:18 +00:00
PromOperatorBot
25e04a8939 [bot] [main] Automated version update (#2055)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-03-29 17:05:31 +01:00
dependabot[bot]
64b4d72d3b build(deps): bump actions/stale from 7 to 8 (#2053)
Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-29 17:05:10 +01:00
Simon Pasquier
c984288cc3 Merge pull request #2051 from prometheus-operator/dependabot/go_modules/k8s.io/client-go-0.26.3
build(deps): bump k8s.io/client-go from 0.26.2 to 0.26.3
2023-03-21 09:20:02 +01:00
dependabot[bot]
624f5914a5 build(deps): bump k8s.io/client-go from 0.26.2 to 0.26.3
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.26.2 to 0.26.3.
- [Release notes](https://github.com/kubernetes/client-go/releases)
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.26.2...v0.26.3)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-20 23:00:19 +00:00
Fran
ec56f4559f Improve ArgoCD support (#2041)
* Improve ArgoCD support

Signed-off-by: Fran Sanjuán <francesc.sanjuan@marfeel.com>

* Add modified yamls

Signed-off-by: Fran Sanjuán <francesc.sanjuan@marfeel.com>

---------

Signed-off-by: Fran Sanjuán <francesc.sanjuan@marfeel.com>
2023-03-20 09:21:46 +00:00
PromOperatorBot
aac1dcf547 [bot] [main] Automated version update (#2049)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-03-20 07:56:43 +00:00
Simon Pasquier
19cf1150a5 Merge pull request #2045 from prometheus-operator/dependabot/github_actions/actions/setup-go-4
build(deps): bump actions/setup-go from 3 to 4
2023-03-16 09:11:31 +01:00
dependabot[bot]
33b12c979d build(deps): bump actions/setup-go from 3 to 4
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-15 22:59:18 +00:00
Philip Gough
f6f3682244 Update gojsontoyaml release and generate manifests (#2043)
* dep: Bump to release v0.1.0 of gojsontoyaml

* make: Generate
2023-03-15 12:54:03 +00:00
Ricardo Ribeiro
274d5856c7 Added custom overrides for kube-rbac-proxy. (#1987)
Missing in prometheus-operator, node-exporter and blacbox-exporter.
2023-03-15 11:47:31 +00:00
Siyuan Wang
c3dad8c70b fix: prometheus network policy let prometheus-adapter pass (#1982) 2023-03-15 11:45:51 +00:00
Roman
f15d65e0b2 Update customizing doc (#2002) 2023-03-15 11:44:26 +00:00
SUN Haoyu
ed6a2f0fc7 additional selector for resource queries in Prometheus Adapter. (#2003)
Signed-off-by: Haoyu Sun <hasun@redhat.com>
2023-03-15 11:42:28 +00:00
dependabot[bot]
09cbd7aa59 build(deps): bump k8s.io/client-go from 0.26.1 to 0.26.2 (#2028)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.26.1 to 0.26.2.
- [Release notes](https://github.com/kubernetes/client-go/releases)
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.26.1...v0.26.2)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-14 20:25:57 +00:00
dependabot[bot]
2263981ba7 build(deps): bump golang.org/x/net in /scripts (#2035)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20220624214902-1bab6f366d9e to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/commits/v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-14 20:25:35 +00:00
dependabot[bot]
c9b0ad7aa8 build(deps): bump k8s.io/apimachinery from 0.26.1 to 0.26.2 (#2027)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.26.1 to 0.26.2.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.26.1...v0.26.2)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-14 19:37:00 +00:00
dependabot[bot]
60f50c7bda build(deps): bump github.com/yannh/kubeconform in /scripts (#2025)
Bumps [github.com/yannh/kubeconform](https://github.com/yannh/kubeconform) from 0.5.0 to 0.6.1.
- [Release notes](https://github.com/yannh/kubeconform/releases)
- [Changelog](https://github.com/yannh/kubeconform/blob/master/.goreleaser.yml)
- [Commits](https://github.com/yannh/kubeconform/compare/v0.5.0...v0.6.1)

---
updated-dependencies:
- dependency-name: github.com/yannh/kubeconform
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-14 19:32:38 +00:00
dependabot[bot]
ecc058185b build(deps): bump golang.org/x/crypto in /scripts (#2036)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.0.0-20211108221036-ceb1ce70b4fa to 0.1.0.
- [Release notes](https://github.com/golang/crypto/releases)
- [Commits](https://github.com/golang/crypto/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-14 19:31:50 +00:00
Joao Marcal
7363e20b65 Adds startupProbe to prometheus-adapter (#2029)
Issue: https://issues.redhat.com/browse/OCPBUGS-7694

Problem: in clusters with a large nb of CRDs deployed prom-adapter takes too long to discover all of them which makes it fail the livenessProbe

Solution: introduce a startupProbe that gives 3 minutes for prom-adapter to initialize

Signed-off-by: JoaoBraveCoding <jmarcal@redhat.com>
2023-03-14 15:39:30 +00:00
PromOperatorBot
bb30afb866 [bot] [main] Automated version update (#2040)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-03-13 07:56:30 +00:00
PromOperatorBot
6737a54cb4 [bot] [main] Automated version update (#2031)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-03-06 08:19:00 +00:00
PromOperatorBot
c5360561fa [bot] [main] Automated version update (#2024)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-02-27 08:14:48 +00:00
Simon Pasquier
74cb76d338 Merge pull request #2018 from prometheus-operator/dependabot/go_modules/scripts/golang.org/x/text-0.3.8
build(deps): bump golang.org/x/text from 0.3.7 to 0.3.8 in /scripts
2023-02-23 12:06:51 +01:00
dependabot[bot]
8ab4e68700 build(deps): bump golang.org/x/text from 0.3.7 to 0.3.8 in /scripts
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.7 to 0.3.8.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.7...v0.3.8)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-23 10:20:45 +00:00
PromOperatorBot
f737ac4d01 [bot] [main] Automated version update (#2014)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-02-20 08:53:28 +00:00
Philip Gough
2115d059ff cut release 0.12 (#1919) (#2000)
Signed-off-by: Haoyu Sun <hasun@redhat.com>
Co-authored-by: SUN Haoyu <hasun@redhat.com>
2023-02-14 10:46:45 +00:00
PromOperatorBot
a0c0a1dc20 [bot] [main] Automated version update (#2010)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-02-13 08:27:01 +00:00
PromOperatorBot
17dc66cec1 [bot] [main] Automated version update (#2001)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2023-02-06 08:01:09 +00:00
Tomáš Burda
c936a999ac added aks platform to platforms (#1997) 2023-01-27 12:48:33 +00:00
Damien Grisonnet
c330a6e428 custom-metrics: fix compilation (#1996)
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2023-01-27 12:30:08 +00:00
dependabot[bot]
67162ddd1b build(deps): bump k8s.io/client-go from 0.26.0 to 0.26.1 (#1992)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.26.0 to 0.26.1.
- [Release notes](https://github.com/kubernetes/client-go/releases)
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.26.0...v0.26.1)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-27 12:27:25 +00:00
Matthias Loibl
ae8dd9341d Merge pull request #1993 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2023-01-25 10:54:02 +00:00
Prometheus Operator Bot
b332c58421 [bot] [main] Automated version update 2023-01-23 07:41:20 +00:00
Matthias Loibl
67c0854519 Merge pull request #1986 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2023-01-16 16:52:35 +00:00
Prometheus Operator Bot
10535cc9c0 [bot] [main] Automated version update 2023-01-16 07:42:02 +00:00
Simon Pasquier
947080b8d0 Increase 'operations-per-run' for the stale action (#1985)
The default value of 30 is too low for the repository and the action
fails to process all issues and pull requests.

This change also modifies when the job is executed to avoid running it
at the same time than prometheus-operator/prometheus-operator and
experience quota issues with the GitHub API.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-01-12 09:50:35 +00:00
Matthias Loibl
9977e3c84c Merge pull request #1983 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2023-01-09 11:11:19 +01:00
Prometheus Operator Bot
ff89167e42 [bot] [main] Automated version update 2023-01-09 07:41:21 +00:00
dependabot[bot]
68feba1eb1 build(deps): bump actions/stale from 6 to 7 (#1978)
Bumps [actions/stale](https://github.com/actions/stale) from 6 to 7.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-04 10:49:39 +00:00
PromOperatorBot
37d0008228 [bot] [main] Automated version update (#1980)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2022-12-26 10:02:59 +00:00
Matthias Loibl
1efb74ac9b Merge pull request #1956 from paulfantom/pyrra-apiserver-slos
jsonnet/addons: use component label instead of job for API server SLOs
2022-12-22 18:13:45 +01:00
PromOperatorBot
78de7b5ea1 [bot] [main] Automated version update (#1975)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2022-12-19 10:29:31 +00:00
Roeland van Batenburg
d3941f9045 illustrate adding to networkpolicies (#1960) 2022-12-16 14:11:24 +00:00
dependabot[bot]
a502918ec4 build(deps): bump k8s.io/client-go from 0.25.4 to 0.26.0 (#1961)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.25.4 to 0.26.0.
- [Release notes](https://github.com/kubernetes/client-go/releases)
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.25.4...v0.26.0)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-16 14:08:07 +00:00
dependabot[bot]
940494c03c build(deps): bump k8s.io/apimachinery from 0.25.4 to 0.26.0 (#1962)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.25.4 to 0.26.0.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.25.4...v0.26.0)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-16 13:58:07 +00:00
dependabot[bot]
db26c1825d build(deps): bump azure/setup-helm from 3.4 to 3.5 (#1967)
Bumps [azure/setup-helm](https://github.com/azure/setup-helm) from 3.4 to 3.5.
- [Release notes](https://github.com/azure/setup-helm/releases)
- [Commits](https://github.com/azure/setup-helm/compare/v3.4...v3.5)

---
updated-dependencies:
- dependency-name: azure/setup-helm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-16 13:57:51 +00:00
Jonathan Cole
2d331eaa7f fix(deps) update kube-state-metrics source repo branch to main (#1968)
* update ksm target git branch name

* `jb update`; `make generate`
2022-12-16 13:57:29 +00:00
Paweł Krupa (paulfantom)
2b0a813639 jsonnet/addons: use component label instead of job for API server SLOs 2022-12-08 12:32:02 +01:00
PromOperatorBot
f4618411fd [bot] [main] Automated version update (#1952)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2022-12-05 09:55:44 +00:00
PromOperatorBot
b71451784a [bot] [main] Automated version update (#1949)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2022-11-28 08:21:57 +00:00
PromOperatorBot
35f69e8b03 [bot] [main] Automated version update (#1946)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2022-11-23 13:22:33 +00:00
Ashton Kemerling
e435c1d640 jsonnet: Update disk selector regex. (#1945)
Update regex used for selecting disk devices to include raid devices of
the form "md123".
2022-11-23 11:41:56 +00:00
dependabot[bot]
6a570e3154 build(deps): bump k8s.io/client-go from 0.25.3 to 0.25.4 (#1938)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.25.3 to 0.25.4.
- [Release notes](https://github.com/kubernetes/client-go/releases)
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.25.3...v0.25.4)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-14 15:46:32 +00:00
Paweł Krupa
ac3b28cdb0 Merge pull request #1939 from prometheus-operator/dependabot/go_modules/k8s.io/apimachinery-0.25.4
build(deps): bump k8s.io/apimachinery from 0.25.3 to 0.25.4
2022-11-14 13:37:44 +01:00
Paweł Krupa
fd63d9ea9f Merge pull request #1913 from raptorsun/bugfix/udev-path
Bugfix: Set path.udev.data Argument of Node Exporter
2022-11-14 13:15:08 +01:00
Paweł Krupa
017b2aa032 Merge pull request #1941 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-11-14 12:52:29 +01:00
Prometheus Operator Bot
c49684d3bb [bot] [main] Automated version update 2022-11-14 07:44:16 +00:00
dependabot[bot]
4346d3aba2 build(deps): bump k8s.io/apimachinery from 0.25.3 to 0.25.4
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.25.3 to 0.25.4.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.25.3...v0.25.4)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-10 22:12:25 +00:00
dependabot[bot]
5a2048ec39 build(deps): bump github.com/prometheus/client_golang (#1937)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.13.1 to 1.14.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.13.1...v1.14.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-09 16:36:42 +00:00
dependabot[bot]
be9fce34ee build(deps): bump github.com/yannh/kubeconform in /scripts (#1909)
Bumps [github.com/yannh/kubeconform](https://github.com/yannh/kubeconform) from 0.4.14 to 0.5.0.
- [Release notes](https://github.com/yannh/kubeconform/releases)
- [Changelog](https://github.com/yannh/kubeconform/blob/master/.goreleaser.yml)
- [Commits](https://github.com/yannh/kubeconform/compare/v0.4.14...v0.5.0)

---
updated-dependencies:
- dependency-name: github.com/yannh/kubeconform
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-07 12:04:56 +00:00
dependabot[bot]
0e79a5e0a0 build(deps): bump k8s.io/client-go from 0.25.2 to 0.25.3 (#1906)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.25.2 to 0.25.3.
- [Release notes](https://github.com/kubernetes/client-go/releases)
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.25.2...v0.25.3)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-07 11:38:03 +00:00
dependabot[bot]
97920a0ac2 build(deps): bump azure/setup-helm from 3.3 to 3.4 (#1925)
Bumps [azure/setup-helm](https://github.com/azure/setup-helm) from 3.3 to 3.4.
- [Release notes](https://github.com/azure/setup-helm/releases)
- [Commits](https://github.com/azure/setup-helm/compare/v3.3...v3.4)

---
updated-dependencies:
- dependency-name: azure/setup-helm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-07 11:31:02 +00:00
dependabot[bot]
474fe2050c build(deps): bump github.com/google/go-jsonnet in /scripts (#1924)
Bumps [github.com/google/go-jsonnet](https://github.com/google/go-jsonnet) from 0.18.0 to 0.19.1.
- [Release notes](https://github.com/google/go-jsonnet/releases)
- [Changelog](https://github.com/google/go-jsonnet/blob/master/.goreleaser.yml)
- [Commits](https://github.com/google/go-jsonnet/compare/v0.18.0...v0.19.1)

---
updated-dependencies:
- dependency-name: github.com/google/go-jsonnet
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-07 11:29:30 +00:00
Olivier Lemasle
f73206f9ed Switch ksm registry to registry.k8s.io (#1914)
Kubernetes has switched registry from k8s.gcr.io to registry.k8s.io
in https://github.com/kubernetes/kubernetes/pull/109938.

kube-state-metrics also did the switch in
https://github.com/kubernetes/kube-state-metrics/pull/1750.

This commit also updates the registry in a kubeadm configuration
example.
2022-11-07 11:10:20 +00:00
dependabot[bot]
01fc10ca73 build(deps): bump github.com/prometheus/client_golang (#1928)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.13.0 to 1.13.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.13.1/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.13.0...v1.13.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-07 11:09:54 +00:00
Prometheus Operator Bot
c55c3b7f87 [bot] [main] Automated version update 2022-11-07 10:52:23 +00:00
Philip Gough
4bb9cb6212 docs: Remove broken link (#1935) 2022-11-07 10:48:33 +00:00
Haoyu Sun
b7781c19a1 set path.udev.data argument of node exporter.
Signed-off-by: Haoyu Sun <hasun@redhat.com>
2022-10-21 17:17:23 +02:00
SUN Haoyu
1bf12a9842 Node Exporter: add parameter for ignored network devices (#1887) 2022-10-19 09:14:25 +01:00
PromOperatorBot
90f30144c4 [bot] [main] Automated version update (#1899)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2022-10-10 09:51:20 +01:00
ashish1099
437c00e3b8 added aks platform which is similar to gke (#1869) 2022-10-06 20:58:07 +01:00
PromOperatorBot
863ffde5fa [bot] [main] Automated version update (#1890)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2022-10-03 09:18:16 +01:00
PromOperatorBot
7d4529d3d7 [bot] [main] Automated version update (#1886)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2022-09-26 09:21:44 +01:00
dependabot[bot]
0300416464 build(deps): bump k8s.io/client-go from 0.25.1 to 0.25.2 (#1882)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.25.1 to 0.25.2.
- [Release notes](https://github.com/kubernetes/client-go/releases)
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.25.1...v0.25.2)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-26 09:12:20 +01:00
dependabot[bot]
47376c435d build(deps): bump actions/stale from 5 to 6 (#1880)
Bumps [actions/stale](https://github.com/actions/stale) from 5 to 6.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-26 09:12:04 +01:00
Simon Pasquier
5b28779e7d Merge pull request #1881 from prometheus-operator/dependabot/go_modules/k8s.io/apimachinery-0.25.2
build(deps): bump k8s.io/apimachinery from 0.25.1 to 0.25.2
2022-09-23 14:31:03 +02:00
dependabot[bot]
6e9ff96ec9 build(deps): bump k8s.io/apimachinery from 0.25.1 to 0.25.2
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.25.1 to 0.25.2.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.25.1...v0.25.2)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-22 22:31:28 +00:00
PromOperatorBot
2799a51a98 [bot] [main] Automated version update (#1877)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2022-09-19 09:53:56 +01:00
dependabot[bot]
35d8e28ff8 build(deps): bump k8s.io/client-go from 0.25.0 to 0.25.1 (#1875)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.25.0 to 0.25.1.
- [Release notes](https://github.com/kubernetes/client-go/releases)
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.25.0...v0.25.1)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-19 09:53:25 +01:00
dependabot[bot]
37846483d6 build(deps): bump k8s.io/apimachinery from 0.25.0 to 0.25.1 (#1874)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.25.0 to 0.25.1.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.25.0...v0.25.1)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-19 09:07:03 +01:00
PromOperatorBot
e21a6b214c [bot] [main] Automated version update (#1871)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2022-09-12 08:08:29 +00:00
Joao Marcal
0a073679c6 Updates Prometheus Adapater version to 0.10.0 (#1865)
Updates Prometheus Adapater image to official image documented in
kubernetes-sigs/prometheus-adapter/README.md
2022-09-06 15:30:55 +01:00
PromOperatorBot
874eaa280e [bot] [main] Automated version update (#1862)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2022-09-05 09:58:12 +01:00
Jan Fajerski
75bc89f6e3 prometheus-adapter: add prefix option to config for container metrics (#1844)
This commit adds the options `containerMetricsPrefix`
to the prometheus-adapter config-map generator. By default this option
is the empty string and doesn't change the current behavior. If set
however to e.g. `pa_`, the prometheus-adapter configuration will add
this prefix to all container_ queries in the resource rules.
This enables users of kube-prometheus to define a specialised service
monitor, that only expose the prometheus-adapter related container metrics with a
different configuration, like `honorTimestamps: true` or a tighter
scrape interval.

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2022-09-02 16:51:30 +01:00
Paweł Krupa
e08a1ec75a Merge pull request #1860 from rdavid/update-readme 2022-09-01 20:15:23 +02:00
David Rabkin
c4129e5483 Update README
- Use a more convenient kube mechanizm:
 https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands\#wait
2022-09-01 19:01:12 +03:00
PromOperatorBot
6190853c1c [bot] [main] Automated version update (#1854)
* [bot] [main] Automated version update

* jsonnet: drop deprecated KSM metric

Signed-off-by: Paweł Krupa (paulfantom) <pawel@krupa.net.pl>

* jsonnet: Drop deprecated KSM metrics

Signed-off-by: Paweł Krupa (paulfantom) <pawel@krupa.net.pl>
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
Co-authored-by: Paweł Krupa (paulfantom) <pawel@krupa.net.pl>
Co-authored-by: Philip Gough <philip.p.gough@gmail.com>
2022-08-30 11:34:17 +01:00
Jayapriya Pai
ed00012d55 .github: Update support template (#1846)
Point to correct discussions link
2022-08-29 11:48:18 +01:00
dependabot[bot]
bfb332ee03 build(deps): bump k8s.io/client-go from 0.24.4 to 0.25.0 (#1849)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.24.4 to 0.25.0.
- [Release notes](https://github.com/kubernetes/client-go/releases)
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.24.4...v0.25.0)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-25 16:09:40 +00:00
dependabot[bot]
faaf58bba5 build(deps): bump k8s.io/apimachinery from 0.24.4 to 0.25.0 (#1848)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.24.4 to 0.25.0.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.24.4...v0.25.0)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-25 17:01:50 +01:00
PromOperatorBot
a4e3fc4cda [bot] [main] Automated version update (#1843)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2022-08-22 15:17:00 +01:00
dependabot[bot]
910ebe5a77 build(deps): bump k8s.io/client-go from 0.24.3 to 0.24.4
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.24.3 to 0.24.4.
- [Release notes](https://github.com/kubernetes/client-go/releases)
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.24.3...v0.24.4)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-19 14:45:17 +01:00
dependabot[bot]
1a0410fda6 build(deps): bump k8s.io/apimachinery from 0.24.3 to 0.24.4 (#1841)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.24.3 to 0.24.4.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.24.3...v0.24.4)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-19 14:37:42 +01:00
PromOperatorBot
67501d0759 [bot] [main] Automated version update (#1838)
Co-authored-by: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
2022-08-15 09:43:23 +01:00
dependabot[bot]
70b68760e3 build(deps): bump github.com/prometheus/client_golang (#1834)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.2 to 1.13.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.2...v1.13.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-09 09:36:49 +02:00
Prometheus Operator Bot
d33c2670d8 [bot] [main] Automated version update 2022-08-08 10:56:20 +01:00
Philip Gough
0453645e0a Merge pull request #1831 from PhilipGough/kubescape-update
kubescape: Add exception for Prometheus SA auto mount of token
2022-08-08 10:55:59 +01:00
Paweł Krupa
f2935d167b Merge pull request #1351 from raptorsun/feature/rulePatching 2022-08-05 17:00:08 +02:00
Philip Gough
4a8ef88232 Merge pull request #1828 from godwhoa/main
readme: Add note about server-side apply in the quickstart
2022-08-05 14:37:55 +01:00
Philip Gough
b496c80293 Merge pull request #1829 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-08-05 14:21:45 +01:00
Philip Gough
c9f2b8cd17 Merge pull request #1824 from prometheus-operator/dependabot/github_actions/azure/setup-helm-3.3
build(deps): bump azure/setup-helm from 3.1 to 3.3
2022-08-02 20:43:27 +01:00
Philip Gough
56f62c479b kubescape: Add exception for Prometheus SA automount of token 2022-08-02 20:37:55 +01:00
Philip Gough
89a931486c Merge pull request #1825 from simonpasquier/update-mdox
Update mdox version
2022-08-02 11:41:51 +01:00
Prometheus Operator Bot
3c09edde90 [bot] [main] Automated version update 2022-08-01 07:45:57 +00:00
Joseph Daniel
6fdb9b40a2 readme: Add note about server-side apply in the quickstart 2022-07-30 20:41:21 +05:30
Simon Pasquier
300bc9657b Update mdox version
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2022-07-27 17:28:08 +02:00
Zadjad Rezai
1fc4bc7e36 Fix broken relative links for non-github pages like prometheus-operator.dev (#1821)
* Fix broken relative links for non-github pages like prometheus-operator.dev

* Update docs/customizations/developing-prometheus-rules-and-grafana-dashboards.md

Co-authored-by: Simon Pasquier <spasquie@redhat.com>

Co-authored-by: Zadjad Rezai <zadjad.rezai@kuehne-nagel.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
2022-07-26 09:52:09 +02:00
dependabot[bot]
e7d3f62cca build(deps): bump azure/setup-helm from 3.1 to 3.3
Bumps [azure/setup-helm](https://github.com/azure/setup-helm) from 3.1 to 3.3.
- [Release notes](https://github.com/azure/setup-helm/releases)
- [Commits](https://github.com/azure/setup-helm/compare/v3.1...v3.3)

---
updated-dependencies:
- dependency-name: azure/setup-helm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25 22:41:52 +00:00
Philip Gough
fb74e6b551 Merge pull request #1823 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-07-25 09:45:21 +01:00
Prometheus Operator Bot
c45fb67ca6 [bot] [main] Automated version update 2022-07-25 07:44:44 +00:00
Philip Gough
9a64c41065 Merge pull request #1810 from zanhsieh/main
fix device regext adjusted for aks and eks
2022-07-22 16:04:36 +01:00
Philip Gough
ea5e9b6ef6 Merge pull request #1820 from prometheus-operator/dependabot/go_modules/scripts/github.com/yannh/kubeconform-0.4.14
build(deps): bump github.com/yannh/kubeconform from 0.4.13 to 0.4.14 in /scripts
2022-07-22 16:03:19 +01:00
Paweł Krupa
dfb622fe61 Merge pull request #1808 from berndonline/main
jsonnet: enable automountServiceAccountToken for prometheus service account
2022-07-19 10:41:06 +02:00
dependabot[bot]
96529791b0 build(deps): bump github.com/yannh/kubeconform in /scripts
Bumps [github.com/yannh/kubeconform](https://github.com/yannh/kubeconform) from 0.4.13 to 0.4.14.
- [Release notes](https://github.com/yannh/kubeconform/releases)
- [Changelog](https://github.com/yannh/kubeconform/blob/master/.goreleaser.yml)
- [Commits](https://github.com/yannh/kubeconform/compare/v0.4.13...v0.4.14)

---
updated-dependencies:
- dependency-name: github.com/yannh/kubeconform
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 22:35:24 +00:00
Philip Gough
7f8ef5acc7 Merge pull request #1816 from prometheus-operator/dependabot/go_modules/k8s.io/client-go-0.24.3
build(deps): bump k8s.io/client-go from 0.24.1 to 0.24.3
2022-07-18 11:12:37 +01:00
dependabot[bot]
76250568ea build(deps): bump k8s.io/client-go from 0.24.1 to 0.24.3
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.24.1 to 0.24.3.
- [Release notes](https://github.com/kubernetes/client-go/releases)
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.24.1...v0.24.3)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 08:39:52 +00:00
Philip Gough
20c9233309 Merge pull request #1794 from prometheus-operator/dependabot/go_modules/scripts/github.com/jsonnet-bundler/jsonnet-bundler-0.5.1
build(deps): bump github.com/jsonnet-bundler/jsonnet-bundler from 0.4.0 to 0.5.1 in /scripts
2022-07-18 09:38:54 +01:00
Philip Gough
67a52ddc51 Merge pull request #1793 from Dominik-K/fork/dominik-k/readme/prometheus-adapter_ref_updated
Readme: update links to `kubernetes-sigs/prometheus-adapter`
2022-07-18 09:38:23 +01:00
Philip Gough
58f800c1cb Merge pull request #1811 from prometheus-operator/dependabot/github_actions/azure/setup-helm-3.1
build(deps): bump azure/setup-helm from 2.1 to 3.1
2022-07-18 09:30:14 +01:00
Philip Gough
a8a3e5e6c9 Merge pull request #1813 from simonpasquier/fix-doc-weights
docs: normalize weight values
2022-07-18 09:29:33 +01:00
Philip Gough
c6f904d341 Merge pull request #1817 from prometheus-operator/dependabot/go_modules/k8s.io/apimachinery-0.24.3
build(deps): bump k8s.io/apimachinery from 0.24.1 to 0.24.3
2022-07-18 09:28:13 +01:00
Philip Gough
e18326fe3b Merge pull request #1818 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-07-18 09:27:53 +01:00
Prometheus Operator Bot
62d87dd8ad [bot] [main] Automated version update 2022-07-18 07:44:00 +00:00
dependabot[bot]
89cc23a606 build(deps): bump k8s.io/apimachinery from 0.24.1 to 0.24.3
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.24.1 to 0.24.3.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.24.1...v0.24.3)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-14 22:33:55 +00:00
Simon Pasquier
84d6d108ce docs: normalize weight values
The `kube` page index gets a weight of 300 and its child pages should
get weight values starting > 300.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2022-07-12 19:39:00 +02:00
dependabot[bot]
6ed3c90f50 build(deps): bump azure/setup-helm from 2.1 to 3.1
Bumps [azure/setup-helm](https://github.com/azure/setup-helm) from 2.1 to 3.1.
- [Release notes](https://github.com/azure/setup-helm/releases)
- [Commits](https://github.com/azure/setup-helm/compare/v2.1...v3.1)

---
updated-dependencies:
- dependency-name: azure/setup-helm
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-11 22:48:55 +00:00
zanhsieh
44e3fc11c6 fix device regext adjusted for aks and eks
Signed-off-by: zanhsieh <zanhsieh@gmail.com>
2022-07-11 22:29:05 +08:00
Arthur Silva Sens
30a6c1bb4a Merge pull request #1809 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-07-11 07:42:37 -03:00
Prometheus Operator Bot
f4a0acd09b [bot] [main] Automated version update 2022-07-11 07:43:51 +00:00
Bernd Malmqvist
edb4f3c8cb enable automountServiceAccountToken for prometheus 2022-07-10 13:53:38 +01:00
Bernd Malmqvist
72583f3d3b enable automountServiceAccountToken for prometheus 2022-07-10 13:19:34 +01:00
Kemal Akkoyun
e3979c27d7 Merge pull request #1802 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-07-04 10:29:57 +02:00
Prometheus Operator Bot
fb40f837b6 [bot] [main] Automated version update 2022-07-04 07:42:33 +00:00
Paweł Krupa
b1c474d8a1 Merge pull request #1795 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-06-27 10:42:38 +02:00
Prometheus Operator Bot
944d372436 [bot] [main] Automated version update 2022-06-27 07:42:54 +00:00
dependabot[bot]
369e8a4fba build(deps): bump github.com/jsonnet-bundler/jsonnet-bundler in /scripts
Bumps [github.com/jsonnet-bundler/jsonnet-bundler](https://github.com/jsonnet-bundler/jsonnet-bundler) from 0.4.0 to 0.5.1.
- [Release notes](https://github.com/jsonnet-bundler/jsonnet-bundler/releases)
- [Changelog](https://github.com/jsonnet-bundler/jsonnet-bundler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsonnet-bundler/jsonnet-bundler/compare/v0.4.0...v0.5.1)

---
updated-dependencies:
- dependency-name: github.com/jsonnet-bundler/jsonnet-bundler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-23 04:21:17 +00:00
Dominik
e79221ea5d Readme: update links to kubernetes-sigs/prometheus-adapter 2022-06-22 18:09:52 +02:00
Paweł Krupa
d8c10a1656 Merge pull request #1786 from raptorsun/release-0.11-follow-up
Release 0.11 follow up
2022-06-20 15:28:46 +02:00
Haoyu Sun
395953346e update Kubernetes versions used by kubeconform to 1.23.6 and 1.24.1
Signed-off-by: Haoyu Sun <hasun@redhat.com>
2022-06-20 14:50:45 +02:00
Haoyu Sun
6f0697b7ca update CI workflow for release 0.11
Signed-off-by: Haoyu Sun <hasun@redhat.com>
2022-06-20 14:50:45 +02:00
Haoyu Sun
0db1d3b131 unpin jsonnet versions after release 0.11
Signed-off-by: Haoyu Sun <hasun@redhat.com>
2022-06-20 14:50:41 +02:00
Philip Gough
17caa6f04c Merge pull request #1789 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-06-20 09:55:24 +01:00
Prometheus Operator Bot
39b907a11c [bot] [main] Automated version update 2022-06-20 07:44:09 +00:00
Paweł Krupa
4af90319f5 Merge pull request #1784 from raptorsun/release-0.11-prep
cut release 0.11
2022-06-17 10:50:33 +02:00
Haoyu Sun
32063c796c cut release 0.11: updated changelog, compatibility matrix, pin dependencies 2022-06-16 17:49:48 +02:00
Philip Gough
4071dafb6a Merge pull request #1783 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-06-13 10:47:13 +01:00
Prometheus Operator Bot
ae7aa586ea [bot] [main] Automated version update 2022-06-13 07:43:09 +00:00
Philip Gough
bfc49f2fe9 Merge pull request #1779 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-06-06 09:48:24 +01:00
Prometheus Operator Bot
e4991ce916 [bot] [main] Automated version update 2022-06-06 07:41:18 +00:00
Philip Gough
fbbfff8f37 Merge pull request #1775 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-05-31 09:53:13 +01:00
Prometheus Operator Bot
730d8a4365 [bot] [main] Automated version update 2022-05-30 07:45:33 +00:00
Paweł Krupa
1c19d2a261 Merge pull request #1768 from centromere/doc-update
doc: main branch is no longer compatible with Kubernetes 1.22
2022-05-27 10:16:13 +02:00
Arthur Silva Sens
43543242c3 Merge pull request #1757 from prometheus-operator/dependabot/go_modules/github.com/prometheus/client_golang-1.12.2
build(deps): bump github.com/prometheus/client_golang from 1.12.1 to 1.12.2
2022-05-26 21:12:42 -03:00
dependabot[bot]
298af14c2e build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.1 to 1.12.2.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.12.2/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.1...v1.12.2)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-26 23:07:05 +00:00
Arthur Silva Sens
71a7d7170c Merge pull request #1772 from prometheus-operator/dependabot/go_modules/k8s.io/client-go-0.24.1
build(deps): bump k8s.io/client-go from 0.24.0 to 0.24.1
2022-05-26 20:06:16 -03:00
dependabot[bot]
2f39966564 build(deps): bump k8s.io/client-go from 0.24.0 to 0.24.1
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.24.0 to 0.24.1.
- [Release notes](https://github.com/kubernetes/client-go/releases)
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.24.0...v0.24.1)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-26 22:26:31 +00:00
Alex Wied
f9ac0151c2 doc: main branch is no longer compatible with Kubernetes 1.22
See: https://github.com/prometheus-community/helm-charts/issues/2018
2022-05-24 14:04:11 -04:00
Philip Gough
acd8aeb686 Merge pull request #1765 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-05-23 09:40:58 +01:00
Prometheus Operator Bot
49572891b5 [bot] [main] Automated version update 2022-05-23 07:46:41 +00:00
Philip Gough
aeb50f066e Merge pull request #1759 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-05-16 12:18:29 +01:00
Haoyu Sun
72132aa5ce add rule patching function 2022-05-16 11:37:59 +02:00
Prometheus Operator Bot
e01be0caa5 [bot] [main] Automated version update 2022-05-16 07:45:29 +00:00
Philip Gough
805f875f8c Merge pull request #1755 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-05-09 09:32:27 +01:00
Prometheus Operator Bot
c95dfddcff [bot] [main] Automated version update 2022-05-09 07:43:59 +00:00
Kemal Akkoyun
93d4499b4c Merge pull request #1753 from prometheus-operator/dependabot/go_modules/k8s.io/client-go-0.24.0
build(deps): bump k8s.io/client-go from 0.23.6 to 0.24.0
2022-05-05 07:11:10 +01:00
dependabot[bot]
98ea964278 build(deps): bump k8s.io/client-go from 0.23.6 to 0.24.0
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.23.6 to 0.24.0.
- [Release notes](https://github.com/kubernetes/client-go/releases)
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.23.6...v0.24.0)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-04 22:25:16 +00:00
Paweł Krupa
e98b9ab5ba Merge pull request #1749 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-05-02 12:17:29 +02:00
Prometheus Operator Bot
5ef5bb81fe [bot] [main] Automated version update 2022-05-02 07:43:31 +00:00
Arthur Silva Sens
0979ac3df3 Merge pull request #1728 from paulfantom/issue-1005
Changing documentation structure
2022-04-27 12:01:28 +01:00
Paweł Krupa (paulfantom)
545d9ed089 *: rework readme
Signed-off-by: Paweł Krupa (paulfantom) <pawel@krupa.net.pl>
2022-04-26 16:24:45 +02:00
Paweł Krupa
a51a935747 Merge pull request #1737 from prometheus-operator/dependabot/go_modules/k8s.io/client-go-0.23.6 2022-04-25 13:02:02 +02:00
Paweł Krupa
7b2a9fb985 Merge pull request #1734 from ArthurSens/as/fix-pyrra-prom-ns
addons/pyrra: Fix prometheus namespace connection
2022-04-25 12:56:31 +02:00
Paweł Krupa
bac6b273fc Merge pull request #1738 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-04-25 12:55:35 +02:00
Prometheus Operator Bot
2ba16bb385 [bot] [main] Automated version update 2022-04-25 07:43:40 +00:00
ArthurSens
d1bcab55e9 addons/pyrra: Fix prometheus namespace connection
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-04-23 08:48:18 +00:00
dependabot[bot]
063427fe18 build(deps): bump k8s.io/client-go from 0.23.5 to 0.23.6
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.23.5 to 0.23.6.
- [Release notes](https://github.com/kubernetes/client-go/releases)
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.23.5...v0.23.6)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-21 22:37:33 +00:00
Arthur Silva Sens
6c1890bf1d Merge pull request #1730 from polRk/patch-1
Access requests to sidecar from thanos-query
2022-04-21 09:55:06 +01:00
Vladislav Polyakov
76f1ba051a style: fmt code 2022-04-19 10:48:24 +03:00
Vladislav Polyakov
35bb9f3ee8 Merge branch 'prometheus-operator:main' into patch-1 2022-04-19 10:32:25 +03:00
Vladislav Polyakov
17d2831fc5 fet: include ingress network policy for thanos 2022-04-19 10:27:14 +03:00
Arthur Silva Sens
90042f1787 Merge pull request #1726 from paulfantom/move-jsonnet
*: move sync-to-internal-registry.jsonnet out of TLD
2022-04-19 07:48:11 +01:00
Philip Gough
047d50493a Merge pull request #1732 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-04-18 08:55:49 +01:00
Prometheus Operator Bot
6ab1c9d2fa [bot] [main] Automated version update 2022-04-18 07:42:47 +00:00
Vladislav Polyakov
62b2347277 Access requests to sidecar from thanos-query 2022-04-14 15:01:55 +03:00
Philip Gough
bbdb94a23e Merge pull request #1675 from sikachu/fix-eks-platform
Fix problems when enabling eks platform patch
2022-04-14 12:49:30 +01:00
Philip Gough
2b7445f75f Merge pull request #1729 from arajkumar/fix-NodeFilesystemSpaceFillingUp-thresholds
Adjust NodeFilesystemSpaceFillingUp thresholds according default kubelet GC behavior
2022-04-14 12:48:29 +01:00
Arunprasad Rajkumar
96c1c5c659 assets: regenerate
Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
2022-04-13 12:25:28 +05:30
Arunprasad Rajkumar
6ff8bfbb02 Adjust NodeFilesystemSpaceFillingUp thresholds according default kubelet GC behavior
Previously[1] we attempted to do the same, but there was a
misunderstanding about the GC behavior and it caused the alert to be
fired even before GC comes into play.

According to[2][3] kubelet GC kicks in only when `imageGCHighThresholdPercent` is hit which is set to 85% by default. However `NodeFilesystemSpaceFillingUp` is set to fire as soon as 80% usage is hit.

This commit changes the `fsSpaceFillingUpWarningThreshold` to 15% so
that we give ample time to GC to reclaim unwanted images. This commit
also changes `fsSpaceFillingUpCriticalThreshold` to 10% which gives more time to admins to react to warning before sending critical alert.

[1] https://github.com/prometheus-operator/kube-prometheus/pull/1357
[2] https://docs.openshift.com/container-platform/4.10/nodes/nodes/nodes-nodes-garbage-collection.html#nodes-nodes-garbage-collection-images_nodes-nodes-configuring
[3] https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/

Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
2022-04-13 12:01:06 +05:30
Philip Gough
02c36e1170 Merge pull request #1727 from paulfantom/dco
*: remove DCO
2022-04-12 12:56:45 +01:00
Paweł Krupa (paulfantom)
7e50affafe *: remove DCO
Signed-off-by: Paweł Krupa (paulfantom) <pawel@krupa.net.pl>
2022-04-12 13:33:20 +02:00
Paweł Krupa (paulfantom)
3370f0bdfe *: move sync-to-internal-registry.jsonnet out of TLD 2022-04-12 12:37:30 +02:00
Paweł Krupa
0e3b5e57c5 Merge pull request #1680 from dzmitry-lahoda/patch-1
containerd windows exporter in pod
2022-04-12 10:11:27 +02:00
Paweł Krupa
3369e5c92c Merge pull request #1723 from prometheus-operator/dependabot/github_actions/azure/setup-helm-2.1
build(deps): bump azure/setup-helm from 2.0 to 2.1
2022-04-12 10:02:55 +02:00
Paweł Krupa
fd828511b5 Merge pull request #1724 from ArthurSens/fix-disable-netpol
Fix networkpolicies-disabled addon
2022-04-12 09:57:45 +02:00
ArthurSens
df3de0ed7c Fix networkpolicies-disabled addon
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-04-12 07:28:14 +00:00
dependabot[bot]
6d7f9b972d build(deps): bump azure/setup-helm from 2.0 to 2.1
Bumps [azure/setup-helm](https://github.com/azure/setup-helm) from 2.0 to 2.1.
- [Release notes](https://github.com/azure/setup-helm/releases)
- [Commits](https://github.com/azure/setup-helm/compare/v2.0...v2.1)

---
updated-dependencies:
- dependency-name: azure/setup-helm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 22:36:21 +00:00
Paweł Krupa
6053258fc3 Merge pull request #1721 from ArthurSens/graf-prom-network-fix 2022-04-11 16:02:25 +02:00
Philip Gough
b79f451b07 Merge pull request #1722 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-04-11 08:58:45 +01:00
Prometheus Operator Bot
14f0a03028 [bot] [main] Automated version update 2022-04-11 07:43:32 +00:00
ArthurSens
8bdd526039 jsonnet/components/prometheus: Fix grafana network access
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-04-11 07:23:09 +00:00
Arthur Silva Sens
73bbec9659 Merge pull request #1716 from prometheus-operator/dependabot/github_actions/actions/stale-5
build(deps): bump actions/stale from 4 to 5
2022-04-09 08:14:33 +01:00
Arthur Silva Sens
962d1a91f5 Merge pull request #1717 from prometheus-operator/dependabot/github_actions/actions/setup-go-3
build(deps): bump actions/setup-go from 2 to 3
2022-04-09 08:13:35 +01:00
Arthur Silva Sens
0ea8653b04 Merge pull request #1711 from ArthurSens/pyrra-versions
Add pyrra to 'update versions' automation
2022-04-09 08:11:41 +01:00
dependabot[bot]
539dcbf595 build(deps): bump actions/setup-go from 2 to 3
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-08 22:44:08 +00:00
dependabot[bot]
db8b4c6f54 build(deps): bump actions/stale from 4 to 5
Bumps [actions/stale](https://github.com/actions/stale) from 4 to 5.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-08 22:44:05 +00:00
ArthurSens
05d996495e Add pyrra to 'update versions' automation
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-04-07 18:50:48 +00:00
Arthur Silva Sens
0c0643f984 Merge pull request #1709 from prometheus-operator/dependabot/github_actions/azure/setup-helm-2.0
build(deps): bump azure/setup-helm from 1 to 2.0
2022-04-06 06:40:29 +01:00
dependabot[bot]
dc4e06bb95 build(deps): bump azure/setup-helm from 1 to 2.0
Bumps [azure/setup-helm](https://github.com/azure/setup-helm) from 1 to 2.0.
- [Release notes](https://github.com/azure/setup-helm/releases)
- [Commits](https://github.com/azure/setup-helm/compare/v1...v2.0)

---
updated-dependencies:
- dependency-name: azure/setup-helm
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-05 22:28:58 +00:00
Arthur Silva Sens
28f71a0e1b Merge pull request #1706 from ArthurSens/as/dead-code
jsonnet/components/grafana: Address FIXME to prevent incoming bug
2022-04-05 11:23:01 +01:00
ArthurSens
3da9bcd152 jsonnet/components/grafana: Address FIXME
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-04-05 09:28:43 +00:00
Kemal Akkoyun
8d2412cf94 Merge pull request #1707 from ArthurSens/as/generate
Regenerate after #1650
2022-04-05 10:24:59 +01:00
ArthurSens
b7aeebe63f Regenerate
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-04-05 08:58:14 +00:00
Arthur Silva Sens
01004de76c Merge pull request #1650 from ArthurSens/as/network-policies
Adds NetworkPolicies to all components of Kube-prometheus
2022-04-05 09:47:05 +01:00
Arthur Silva Sens
a182d78794 Merge pull request #1704 from PhilipGough/mod-tidy
Cleanup of dependencies
2022-04-04 12:58:51 +01:00
Arthur Silva Sens
037155b5c8 Merge pull request #1705 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-04-04 08:47:30 +01:00
Prometheus Operator Bot
a16675bc0e [bot] [main] Automated version update 2022-04-04 07:42:34 +00:00
Philip Gough
b5a49d63da test: Wrap errors using stdlib 2022-04-02 15:33:27 +01:00
Philip Gough
d0d1313ac3 mod: Update deps and remove archived errors pkg 2022-04-02 15:33:27 +01:00
Philip Gough
92cb360578 CI: Update Go and Kind versions 2022-04-02 15:33:27 +01:00
Philip Gough
779ef33dae CI: Delete unused env file 2022-04-02 15:27:38 +01:00
Philip Gough
eb0fafd789 Merge pull request #1667 from metalmatze/pyrra
Add Pyrra as (optional) component
2022-03-31 14:05:57 +01:00
Arthur Silva Sens
281d69e342 Merge pull request #1701 from JoaoBraveCoding/add-port-name
Adds port name to prometheus-adapter
2022-03-31 07:41:30 +01:00
Matthias Loibl
2dad999332 Add Pyrra as addon and commented out example.jsonnet parts 2022-03-30 21:20:13 +02:00
Joao Marcal
cf36ffb335 Adds YAML for jsonnet modified for prometheus-adapter 2022-03-30 15:35:36 +01:00
Joao Marcal
1d46f7ece9 Adds port name to prometheus-adapter jsonnet 2022-03-30 15:34:40 +01:00
Philip Gough
6f7a799b78 Merge pull request #1696 from JoaoBraveCoding/2048333
Adds readinessProbe and livenessProbe to prometheus-adapter jsonnet
2022-03-30 09:18:11 +01:00
Joao Marcal
652c6d538e Adds YAML for jsonnet modified in the previous commit 2022-03-30 07:23:05 +01:00
Joao Marcal
f6190e200a Adds readinessProbe and livenessProbe to prometheus-adapter jsonnet
Problem: Currently the prometheus-adapter pods are restarted at the same
time even though the deployment is configured with strategy RollingUpdate.
This happens because the kubelet does not know when the prometheus-adapter
pods are ready to start receiving requests.

Solution: Add both readinessProbe and livenessProbe to the
prometheus-adapter, this way the kubelet will know when either the pod
stoped working and should be restarted or simply when it ready to start
receiving requests.

Issue: https://bugzilla.redhat.com/show_bug.cgi?id=2048333
2022-03-30 07:22:55 +01:00
Simon Pasquier
d6083dcb2d Merge pull request #1699 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-03-28 11:01:44 +02:00
Prometheus Operator Bot
c30d8c1ef6 [bot] [main] Automated version update 2022-03-28 07:41:44 +00:00
Philip Gough
64b19b69d5 Merge pull request #1697 from prometheus-operator/dependabot/github_actions/peter-evans/create-pull-request-4
build(deps): bump peter-evans/create-pull-request from 3 to 4
2022-03-25 11:48:59 +00:00
dependabot[bot]
16e12ce24b build(deps): bump peter-evans/create-pull-request from 3 to 4
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3 to 4.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v3...v4)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-23 22:46:54 +00:00
Kemal Akkoyun
c11f002fe7 Merge pull request #1692 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-03-21 08:48:46 +01:00
Prometheus Operator Bot
c8361720f9 [bot] [main] Automated version update 2022-03-21 07:41:58 +00:00
Dzmitry Lahoda
f748b2a0e8 containerd windows exporter in pod 2022-03-14 09:16:31 -07:00
Philip Gough
373e2b415b Merge pull request #1678 from dnsmichi/docs-mon-namespaces-0-8-values
Docs: Use `values` config in 'Monitoring other namespaces' example
2022-03-14 09:52:31 +00:00
Arthur Silva Sens
2e78414b1a Merge pull request #1679 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-03-14 08:23:08 +00:00
Prometheus Operator Bot
1f74cb4148 [bot] [main] Automated version update 2022-03-14 07:41:15 +00:00
Michael Friedrich
16f3640eaf Docs: Fix s/_config/values/ in 'monitoring other namespaces' chapter
Signed-off-by: Michael Friedrich <mfriedrich@gitlab.com>
2022-03-12 18:38:39 +01:00
Prem Sichanugrist
257031ec49 Fix problems when enabling eks platform patch 2022-03-10 13:44:08 +09:00
Arthur Silva Sens
2c0eb87baa Merge pull request #1672 from slashpai/update_readme
README: Update kubernetes version to 1.23 in minikube
2022-03-09 08:50:09 +00:00
paulfantom
3ad08674b3 manifests: regenerate
Signed-off-by: paulfantom <pawel@krupa.net.pl>
Signed-off-by: Paweł Krupa (paulfantom) <pawel@krupa.net.pl>
(cherry picked from commit d3ea3147a8)
(cherry picked from commit d24c347b2742d9474c8f441f2831262c63b8c79b)
2022-03-09 07:48:01 +00:00
Arthur Silva Sens
3f3b56e247 alertmanager/networkPolicy: Allow cluster peer-to-peer communication
Signed-off-by: GitHub <noreply@github.com>
(cherry picked from commit df68b8d1da5d2d91b9502d4be67063c2c497e0cb)
2022-03-09 07:47:28 +00:00
Arthur Silva Sens
acaf2fe0e7 Adjust Kubescape threshold
Signed-off-by: GitHub <noreply@github.com>
(cherry picked from commit 233a8ac3e947af8fca6524aae4fa4a514e6279ca)
2022-03-09 07:47:28 +00:00
Arthur Silva Sens
ea158da23f Add networkPolicies for alertmanager, grafana, prometheus-operator and prometheus
Signed-off-by: GitHub <noreply@github.com>
(cherry picked from commit 86e16b539cc57710b50f4692848cab5645e3d2bc)
2022-03-09 07:47:25 +00:00
Paweł Krupa (paulfantom)
030dec7656 *: add example for disabling NetworkPolicies
(cherry picked from commit b4bf38ba6c)
(cherry picked from commit c21bf4fbfa478fd163c091054d9fcc98836d7045)
2022-03-09 07:46:44 +00:00
paulfantom
fddf642de7 jsonnet: add networkpolicies for components accessed by prometheus
(cherry picked from commit f8c00b9963)
(cherry picked from commit f09b8e5de2e46db85f090549d37eeb878a81842f)
2022-03-09 07:42:09 +00:00
ArthurSens
494b84d038 .github/workflows: Use cilium on e2e-test
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-03-09 07:42:09 +00:00
Jayapriya Pai
5b1d455879 README: Update kubernetes version to 1.23 in minikube
Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
2022-03-09 11:11:04 +05:30
Paweł Krupa
9cf6111562 Merge pull request #1668 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-03-07 08:50:46 +01:00
Prometheus Operator Bot
4a9f97b41f [bot] [main] Automated version update 2022-03-07 07:41:44 +00:00
Matthias Loibl
28f23c5196 Merge pull request #1663 from prometheus-operator/dependabot/github_actions/actions/checkout-3
build(deps): bump actions/checkout from 2 to 3
2022-03-02 12:12:30 +01:00
dependabot[bot]
5b309fcc0d build(deps): bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 22:48:42 +00:00
Matthias Loibl
f6e704cceb Merge pull request #1662 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-02-28 11:56:47 +01:00
Prometheus Operator Bot
61c007ef56 [bot] [main] Automated version update 2022-02-28 07:40:53 +00:00
Philip Gough
15664a1983 Merge pull request #1657 from ArthurSens/drop-dashboard-example
Add drop dashboards example
2022-02-24 09:16:37 +00:00
Arthur Silva Sens
ef62cebca5 Merge pull request #1658 from prometheus-operator/dependabot/go_modules/scripts/github.com/yannh/kubeconform-0.4.13
build(deps): bump github.com/yannh/kubeconform from 0.4.12 to 0.4.13 in /scripts
2022-02-24 07:07:43 +00:00
dependabot[bot]
d3aa0eb522 build(deps): bump github.com/yannh/kubeconform in /scripts
Bumps [github.com/yannh/kubeconform](https://github.com/yannh/kubeconform) from 0.4.12 to 0.4.13.
- [Release notes](https://github.com/yannh/kubeconform/releases)
- [Changelog](https://github.com/yannh/kubeconform/blob/master/.goreleaser.yml)
- [Commits](https://github.com/yannh/kubeconform/compare/v0.4.12...v0.4.13)

---
updated-dependencies:
- dependency-name: github.com/yannh/kubeconform
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-23 22:22:01 +00:00
ArthurSens
61f05b2050 Add drop dashboards example
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-02-23 14:18:57 +00:00
Arthur Silva Sens
0ac0d7f9bf Merge pull request #1654 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-02-21 08:26:16 +00:00
Prometheus Operator Bot
36ace1ce7a [bot] [main] Automated version update 2022-02-21 07:40:44 +00:00
Philip Gough
53542d5cce Merge pull request #1637 from ahysing/custom-requests-kube-rbacc-proxy-self
Added custom overrides for kube-rbac-proxy-self.
2022-02-18 16:32:30 +00:00
Paweł Krupa
7ea83986a8 Merge pull request #1649 from PhilipGough/ne-priority 2022-02-18 15:26:40 +01:00
Philip Gough
2918583c81 node_exporter: Add priorityClassName as system-cluster-critical 2022-02-17 12:11:31 +00:00
Paweł Krupa
5ff20b1718 Merge pull request #1630 from PhilipGough/fix-1603 2022-02-16 21:46:08 +01:00
Arthur Silva Sens
3f1323dae8 Merge pull request #1647 from wulfthimm/wth/fix-node-exp
Removed CAP_ from node-exporter daemonset
2022-02-16 14:53:11 +00:00
Wulf Thimm
30bfd69c3e removed CAP_ from node-exporter daemonset 2022-02-16 14:41:20 +00:00
Matthias Loibl
5850e56501 Merge pull request #1643 from ArthurSens/as/fixme
Removes dead code
2022-02-15 19:05:54 +01:00
ArthurSens
78ca6d9579 Address FIXME
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-02-15 15:20:34 +00:00
Arthur Silva Sens
d270540308 Merge pull request #1628 from ravilr/fix_cluster_cpu_query
fix cluster:node_cpu:ratio query
2022-02-15 06:28:22 +00:00
Arthur Silva Sens
7612bc33cb Merge pull request #1642 from wulfthimm/fix-node-exp-psp
added allowedCapabilities to node-exporter psp
2022-02-14 14:55:01 +00:00
Wulf Thimm
a5c5adba68 added allowedCapabilities to node-exporter psp 2022-02-14 14:38:13 +00:00
Philip Gough
7c715c8126 Merge pull request #1624 from ArthurSens/grafana-volume
Add extra-volume mount for plugins downloads
2022-02-14 11:15:14 +00:00
Philip Gough
bb85080094 Merge pull request #1634 from PhilipGough/docs
Update apiVersion from deprecated RBAC
2022-02-14 09:42:07 +00:00
Paweł Krupa
dde70ed05a Merge pull request #1641 from dangviettuan/main
spelling correction
2022-02-14 10:22:01 +01:00
Paweł Krupa
6d00711044 Merge pull request #1640 from prometheus-operator/automated-updates-main 2022-02-14 10:21:48 +01:00
Tuan Dang
cc6a58359f spelling correction 2022-02-14 15:25:29 +07:00
Prometheus Operator Bot
ac7f6b42ab [bot] [main] Automated version update 2022-02-14 07:41:12 +00:00
Andreas Dreyer Hysing
a5cf1a6ef6 Added changelog entry 2022-02-11 15:56:44 +01:00
Andreas Dreyer Hysing
154019ad82 Added custom overrides for kube-rbac-proxy-self. 2022-02-11 15:29:58 +01:00
Philip Gough
41a5ef110d Update apiVersion from deprecated RBAC 2022-02-10 17:42:04 +00:00
Arthur Silva Sens
768e882ce8 Merge pull request #1633 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-02-10 16:14:00 +00:00
Prometheus Operator Bot
2de3d810b1 [bot] [main] Automated version update 2022-02-10 15:40:58 +00:00
Philip Gough
58fa27a40e Update PodMonitor for kube-proxy 2022-02-10 09:45:27 +00:00
ravilr
1d1ca283b1 fix cluster:node_cpu:ratio query 2022-02-09 20:21:05 -08:00
Arthur Silva Sens
43879b5217 Add extra-volume mount for plugins downloads
Signed-off-by: GitHub <noreply@github.com>
2022-02-07 20:31:58 +00:00
Paweł Krupa
e4aae0fbb7 Merge pull request #1620 from prometheus-operator/dependabot/go_modules/scripts/github.com/yannh/kubeconform-0.4.12 2022-02-07 14:41:54 +01:00
Arthur Silva Sens
89184da7c6 Merge pull request #1622 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-02-07 08:11:54 +00:00
Prometheus Operator Bot
7b602e1372 [bot] [main] Automated version update 2022-02-07 07:40:53 +00:00
Arthur Silva Sens
db61b3e18e Merge pull request #1591 from paulfantom/automountServiceAccountToken
disable injecting unnecessary variables allowing access to k8s API
2022-02-05 18:28:33 +00:00
Paweł Krupa (paulfantom)
dd37165884 *: reduce kubescale threshold to single digit 2022-02-04 14:17:00 +01:00
dependabot[bot]
776b45a5b4 build(deps): bump github.com/yannh/kubeconform in /scripts
Bumps [github.com/yannh/kubeconform](https://github.com/yannh/kubeconform) from 0.4.7 to 0.4.12.
- [Release notes](https://github.com/yannh/kubeconform/releases)
- [Changelog](https://github.com/yannh/kubeconform/blob/master/.goreleaser.yml)
- [Commits](https://github.com/yannh/kubeconform/compare/v0.4.7...v0.4.12)

---
updated-dependencies:
- dependency-name: github.com/yannh/kubeconform
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-04 13:15:10 +00:00
Paweł Krupa
0a76dc71d0 Merge pull request #1617 from prometheus-operator/paulfantom-patch-1 2022-02-04 14:13:59 +01:00
Paweł Krupa (paulfantom)
8cb6979426 docs: add security considerations regarding automountServiceAccountToken 2022-02-04 14:10:01 +01:00
Paweł Krupa (paulfantom)
731843f4cd manifests: regenerate 2022-02-04 14:09:43 +01:00
Paweł Krupa (paulfantom)
3429bc77a4 disable injecting unnecessary variables allowing access to k8s API 2022-02-04 14:08:52 +01:00
Paweł Krupa
3436e1a92e Merge pull request #1612 from ArthurSens/remove-hostport 2022-02-04 12:58:13 +01:00
Paweł Krupa
f51e9b14e9 Merge pull request #1616 from ArthurSens/as/kubescape 2022-02-04 12:23:03 +01:00
Paweł Krupa
57be33120d Create dependabot.yml 2022-02-04 12:17:58 +01:00
ArthurSens
ce98a61205 Loosen Kubescape threshold
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-02-04 10:13:07 +00:00
ArthurSens
fb92a6dbe0 Document better why we use hostPort on node-exporter
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-02-03 15:47:43 +00:00
Paweł Krupa
087f479b2a Merge pull request #1614 from arajkumar/sanitize-all-denylist-regex 2022-02-03 16:07:41 +01:00
Arunprasad Rajkumar
0eabbb5d0c Sanitize all regex denylist in ksm-lite addon
This is a follow up fix of https://github.com/prometheus-operator/kube-prometheus/pull/1613. @simonpasquier recommended to sanitize all denylist metrics.

Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
2022-02-03 19:52:44 +05:30
Paweł Krupa
15137a39a7 Merge pull request #1613 from arajkumar/sanitize-regex-denylist 2022-02-03 14:07:45 +01:00
Arunprasad Rajkumar
f16277e8e0 Sanitize regex denylist in ksm-lite addon
The following metrics are missing from kube-state-metrics:
- kube_pod_container_status_terminated_reason
- kube_pod_init_container_status_terminated_reason
- kube_pod_status_scheduled_time

Previously, some metrics were removed from kube-state-metrics by adding the following --metric-denylist argument to the kube-state-metrics container

```
--metric-denylist=
kube_.+_created,
kube_.+_metadata_resource_version,
kube_replicaset_metadata_generation,
kube_replicaset_status_observed_generation,
kube_pod_restart_policy,
kube_pod_init_container_status_terminated,
kube_pod_init_container_status_running,
kube_pod_container_status_terminated,
kube_pod_container_status_running,
kube_pod_completion_time,
kube_pod_status_scheduled
```

--metric-denylist: Comma-separated list of metrics not to be enabled. This list comprises of exact metric names and/or regex patterns. The allowlist and denylist are mutually exclusive.

However, all the list of metrics is managed as RegEx, thus "kube_pod_container_status_terminated" denies .*kube_pod_container_status_terminated.*, that's why kube_pod_init_container_status_terminated_reason is missing

Co-authored-by: Florian Gleizes <fgleizes@redhat.com>
Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
2022-02-03 17:50:22 +05:30
Arthur Silva Sens
755d27bb46 Merge pull request #1610 from ArthurSens/as/linux-hardening
Drop Linux capabilities
2022-02-02 12:56:21 +00:00
Arthur Silva Sens
21e26c808a Merge pull request #1609 from paulfantom/fix-1602
jsonnet: filter out kube-proxy alerts when kube-proxy is disabled
2022-02-01 17:23:51 +00:00
Paweł Krupa (paulfantom)
35f0bca4da manifests: regenerate 2022-02-01 16:22:57 +01:00
Paweł Krupa (paulfantom)
86ac6f79b1 jsonnet: filter out kube-proxy alerts when kube-proxy is disabled
Signed-off-by: Paweł Krupa (paulfantom) <pawel@krupa.net.pl>
2022-02-01 16:22:48 +01:00
Arthur Silva Sens
931af3241d Drop Linux capabilities
Signed-off-by: GitHub <noreply@github.com>
2022-02-01 09:25:21 +00:00
Paweł Krupa
6bfb07aac2 Merge pull request #1608 from ArthurSens/as/fixme 2022-01-31 19:44:45 +01:00
ArthurSens
e5610b2e8d Address FIXME
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-01-31 17:25:00 +00:00
Arthur Silva Sens
2e5337ee8e Merge pull request #1607 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-01-31 17:09:07 +00:00
Prometheus Operator Bot
dad37c968d [bot] [main] Automated version update 2022-01-31 17:04:19 +00:00
Paweł Krupa
85de14dd8d Merge pull request #1606 from paulfantom/revert-1598 2022-01-31 18:01:24 +01:00
Paweł Krupa (paulfantom)
a44622ed54 Revert "workflows/versions: Enable auto-merge"
This reverts commit f0d9be27b3.
2022-01-31 17:52:19 +01:00
Arthur Silva Sens
b113c45a18 Merge pull request #1600 from ArthurSens/readOnlyRootFilesystem 2022-01-28 11:59:47 +00:00
ArthurSens
98664db925 Adjust Kubescape threshold
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-01-27 16:05:39 +00:00
Arthur Silva Sens
57c46a2861 components/*: Forbid write access to root filesystem
Signed-off-by: GitHub <noreply@github.com>
2022-01-27 16:03:58 +00:00
Simon Pasquier
48b2bb6a72 Merge pull request #1601 from PhilipGough/kubescape-1
docs: Update broken link
2022-01-27 16:09:38 +01:00
Paweł Krupa
b68f3f0f07 Merge pull request #1556 from arajkumar/fix-thanos-sidecar-selector 2022-01-27 13:06:59 +01:00
Philip Gough
ea7141ffe2 docs: Update broken link 2022-01-27 10:52:09 +00:00
Philip Gough
3521698843 Merge pull request #1590 from PhilipGough/kubescape-1
Document security audit exceptions for node-exporter
2022-01-27 09:59:22 +00:00
Paweł Krupa
c2d6b3e8c6 Merge pull request #1598 from ArthurSens/as/dependency-automerge 2022-01-25 17:34:29 +01:00
ArthurSens
f0d9be27b3 workflows/versions: Enable auto-merge
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-01-25 15:30:57 +00:00
Philip Gough
586fc87b81 make: Lower the threshold for the security scan to account for documented exceptions 2022-01-24 10:58:08 +00:00
Philip Gough
b924650344 docs: Add details about security scanning of manifests and exceptions 2022-01-24 10:58:08 +00:00
Philip Gough
02f1550261 ci: Add exceptions for node-exporter to kubescape config 2022-01-24 10:45:52 +00:00
Arthur Silva Sens
4d004393e1 Merge pull request #1593 from prometheus-operator/as/forbid-privilege-scalation
Explicitly declare allowPrivilegeEscalation to false in all components
2022-01-24 10:38:33 +00:00
Arthur Silva Sens
2d02121731 kubescape: Adjust risk threshold
Signed-off-by: GitHub <noreply@github.com>
2022-01-24 10:31:48 +00:00
Arthur Silva Sens
b60b302499 Explicitly declare allowPrivilegeEscalation to false
Although containers that do not run as privileged already have this set to false by kubernetes
Kubespace [asks us](https://hub.armo.cloud/docs/c-0016) to explicitly declare it to false where not needed.

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2022-01-24 10:31:43 +00:00
Arthur Silva Sens
90ad3c99fc Merge pull request #1594 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-01-24 08:31:53 +00:00
Prometheus Operator Bot
ef40bc5759 [bot] [main] Automated version update 2022-01-24 07:43:49 +00:00
Arthur Silva Sens
f7d3019a8f Merge pull request #1584 from PhilipGough/fix-1466
Scan generated manifests with kubescape in CI
2022-01-18 11:51:29 -03:00
Philip Gough
9c9f73f6c5 ci: Add check for security scan of manifest 2022-01-17 16:08:19 +00:00
Philip Gough
e286f74647 make: Target for security scan 2022-01-17 16:08:19 +00:00
Philip Gough
b8a05f4197 scripts: Adds kubescape to tooling
https://github.com/armosec/kubescape allows us to
run a scan of the generated manifests and assess the
security risk.
2022-01-17 16:08:19 +00:00
Philip Gough
d2cae36f84 Merge pull request #1586 from PhilipGough/go-version-bump
build: Bump to build with Go 1.17
2022-01-17 16:08:00 +00:00
Philip Gough
1344092b36 build: Bump to build with Go 1.17 2022-01-17 15:18:50 +00:00
Paweł Krupa
fabf443d4d Merge pull request #1583 from prometheus-operator/automated-updates-main 2022-01-17 11:49:19 +01:00
Prometheus Operator Bot
b8bbb57b28 [bot] [main] Automated version update 2022-01-17 07:42:02 +00:00
Philip Gough
f2559e0ced Merge pull request #1566 from primeroz/fix/do-not-add-namespace-to-clusterwide-resources
Hide namespace for prometheus clusterRole and clusterRolebinding
2022-01-10 11:19:31 +00:00
Paweł Krupa
6ce05e2541 Merge pull request #1579 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2022-01-10 10:40:05 +01:00
Andrei Nistor
1d3dbe61cb Inhibit info alerts unless other alerts fire (#1507)
* Inhibit info alerts unless other alerts fire

* Fix nits
2022-01-10 10:37:43 +01:00
Prometheus Operator Bot
69c2281866 [bot] [main] Automated version update 2022-01-10 07:42:01 +00:00
Paweł Krupa
b2a250f39b Merge pull request #1472 from paulfantom/prom-agent 2022-01-07 11:49:46 +01:00
Arunprasad Rajkumar
b7a135a101 Fix thanos sidecar selector
Previous PR[1] which deprecated `thanosSelector` accidentally broke the
usage of it. This commit restores the old behaviour along with newly
introduced `thanos` config variable.

[1] https://github.com/prometheus-operator/kube-prometheus/pull/1543

Co-authored-by: Pawe? Krupa <pawel@krupa.net.pl>
Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
2022-01-05 16:23:24 +05:30
Paweł Krupa
529739d5ef Merge pull request #1572 from ArthurSens/as/projected-psp 2022-01-04 13:37:13 +01:00
ArthurSens
f4a5ff3e3b addon/podsecuritypolicies: Add projected volumes permission
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-01-04 12:24:05 +00:00
Paweł Krupa
d3e6d4601e Merge pull request #1458 from paulfantom/grafana-mixin 2022-01-04 12:45:23 +01:00
Francesco Ciocchetti
f7738d7434 Set namespace to null for clusterwide resources and generate manifests 2022-01-04 10:03:14 +01:00
Paweł Krupa (paulfantom)
8c8a9662b1 docs: regenerate 2022-01-04 09:44:24 +01:00
Paweł Krupa (paulfantom)
f01d3e6c87 examples: prometheus version no longer needed for agent snippet 2022-01-04 09:43:55 +01:00
Paweł Krupa (paulfantom)
a8485f599b *: regenerate 2022-01-04 09:14:47 +01:00
paulfantom
ec40014ac3 jsonnet: add grafana-mixin
Signed-off-by: paulfantom <pawel@krupa.net.pl>
Signed-off-by: Paweł Krupa (paulfantom) <pawel@krupa.net.pl>
2022-01-04 09:14:43 +01:00
Paweł Krupa
9d4ba547b8 Merge pull request #1571 from paulfantom/jsonnet-0.18 2022-01-03 13:34:13 +01:00
Paweł Krupa
afd216df43 Merge pull request #1569 from inductor/fix_kubeadm_integration 2022-01-03 13:04:53 +01:00
Paweł Krupa (paulfantom)
5a844df97e scripts: bump jsonnet to 0.18 2022-01-03 12:19:20 +01:00
Paweł Krupa
7f634d7e38 Merge pull request #1570 from prometheus-operator/automated-updates-main 2022-01-03 10:33:28 +01:00
Prometheus Operator Bot
0298cc1d61 [bot] [main] Automated version update 2022-01-03 07:41:37 +00:00
inductor
e884935646 add period at the end of the sentence 2021-12-31 00:02:17 +09:00
inductor
20e2c58eb6 fix https://github.com/prometheus-operator/kube-prometheus/issues/1194 2021-12-30 23:53:23 +09:00
Philip Gough
136b818c9a Merge pull request #1560 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2021-12-20 14:20:21 +00:00
Prometheus Operator Bot
8aca1fb1cb [bot] [main] Automated version update 2021-12-20 14:15:02 +00:00
Philip Gough
cf0d4aa45c Merge pull request #1558 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2021-12-20 09:06:50 +00:00
Prometheus Operator Bot
245427cafb [bot] [main] Automated version update 2021-12-20 07:41:04 +00:00
Philip Gough
1f8a45398b Merge pull request #1555 from PhilipGough/0.10-follow-up
release-0.10 follow up
2021-12-18 10:52:27 +00:00
Philip Gough
56aa1a4dc4 make: validate against k8s 1.23.x 2021-12-17 12:40:50 +00:00
Philip Gough
914de7bb7a ci: include release-0.10 2021-12-17 12:37:30 +00:00
Philip Gough
2a135c38d7 jsonnet: Track latest deps 2021-12-17 12:31:25 +00:00
Philip Gough
4d6f45c5f0 Merge pull request #1552 from PhilipGough/release-0.10-prep
Prep for release-0.10
2021-12-17 12:24:39 +00:00
Philip Gough
c6dc6c7d1e docs: 0.10 changelog 2021-12-17 11:38:05 +00:00
Philip Gough
ded3f7bda8 Sync dependencies prior to release-0.10 2021-12-17 11:38:05 +00:00
Philip Gough
480cb2ced4 jsonnet: Pin deps for 0.10 2021-12-17 11:38:05 +00:00
Philip Gough
23b55e7a65 docs: Add release-0.10 to compatability matrix 2021-12-17 11:12:10 +00:00
Paweł Krupa
3652ff073e Merge pull request #1553 from PhilipGough/bump-k8s 2021-12-16 19:22:18 +01:00
Philip Gough
16bc5d63b3 jsonnet: Drop deprecated coredns_cache_misses_total
Deprecated via https://github.com/coredns/coredns/pull/4781
2021-12-16 18:07:14 +00:00
Philip Gough
1263e1cba3 jsonnet: Drop deprecated apiserver_longrunning_gauge and apiserver_registered_watchers metrics
Drop deprecated metric to fix failing test.

Dropped via https://github.com/kubernetes/kubernetes/pull/103793
2021-12-16 17:08:01 +00:00
Philip Gough
d5802ffe2d ci: Bump k8s version and update compatability matrix 2021-12-16 17:07:38 +00:00
Paweł Krupa
ddfbed0d89 Merge pull request #813 from Blizter/example/alertmanager-custom-config 2021-12-16 10:45:33 +01:00
Paweł Krupa
3c8103b34c Merge pull request #1543 from arajkumar/add-thanos-targetgroup 2021-12-16 10:08:37 +01:00
Paweł Krupa
b0fec136ef Merge pull request #4 from ArthurSens/prom-agent 2021-12-15 10:06:48 +01:00
ArthurSens
049882b85b docs/customization: Add prometheus-agent example
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-12-14 15:07:00 +00:00
Arunprasad Rajkumar
1ff5273f87 Deprecate thanosSelector and keep until 0.10.0
Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
2021-12-13 16:23:37 +05:30
Paweł Krupa
9b532dac0c Merge pull request #1546 from prometheus-operator/automated-updates-main 2021-12-13 09:48:17 +01:00
Prometheus Operator Bot
b40f0aa68c [bot] [main] Automated version update 2021-12-13 07:41:10 +00:00
Arunprasad Rajkumar
1fb864ec21 Remove thanosSelector and expose mixin._config.thanos config variable for thanos sidecar
This commit removes existing `thanosSelector` and exposes a single config variable `mixin._config.thanos` to customize thanos sidecar mixins. It follows same structure as d2d74dac98/mixin/config.libsonnet

Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
2021-12-10 08:56:44 +05:30
Paweł Krupa
9ca30579f6 Merge pull request #1541 from sweetpotatoman/main 2021-12-09 10:52:47 +01:00
sweetpotatoman
c0cb286c29 change grafana deployment config checksum 2021-12-09 17:45:15 +08:00
sweetpotatoman
bd9e2d4d2d Security: Upgrade Grafana Version, Fixes CVE-2021-43798 2021-12-09 11:33:34 +08:00
Paweł Krupa
6d013d4e4f Merge pull request #1536 from prometheus-operator/automated-updates-main 2021-12-06 11:27:52 +01:00
Prometheus Operator Bot
0a339a710a [bot] [main] Automated version update 2021-12-06 07:40:35 +00:00
Arthur Silva Sens
f7c9de918c Merge pull request #1534 from junotx/k8s-rule-group
jsonnet: fix default empty groups for k8s PrometheusRule
2021-12-03 09:39:23 -03:00
junot
bd95a19cc3 fix default empty groups for k8s PrometheusRule 2021-12-03 14:08:59 +08:00
Paweł Krupa
32747f2a3b Merge pull request #3 from ArthurSens/prom-agent 2021-12-01 11:02:37 +01:00
ArthurSens
d60c5f6b69 examples/prometheus-agent: Hide ruleSelector
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-11-30 17:24:34 +00:00
ArthurSens
6437e1414a examples/prometheus-agent: Override agent-only flags
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-11-30 17:13:12 +00:00
Arthur Silva Sens
5885e2a332 Merge pull request #1502 from paulfantom/manifests 2021-11-30 06:50:14 -03:00
paulfantom
57af486360 *: regenerate 2021-11-30 10:08:29 +01:00
paulfantom
72664d900b examples: simplify kustomize.jsonnet
This also renames files to be aligned with names used in jsonnet

Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-11-30 10:08:29 +01:00
paulfantom
06fd109ebc manifests: regenerate 2021-11-30 10:08:29 +01:00
paulfantom
724f0034ca examples,manifests: provide only NS and CRDs in setup directory 2021-11-30 10:08:29 +01:00
Arthur Silva Sens
559bc87b35 Merge pull request #1528 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2021-11-29 20:46:24 -03:00
Paweł Krupa
67cdd8a3f6 Merge pull request #2 from ArthurSens/prom-agent 2021-11-29 17:58:16 +01:00
Arthur Silva Sens
8ed8f70148 Merge pull request #1521 from paulfantom/recommend-server-side-apply
*: point to using server-side apply with kubectl as a solution to large CRDs
2021-11-29 10:05:39 -03:00
paulfantom
7446df9fff *: point to using server-side apply with kubectl as a solution to large CRDs
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-11-29 11:58:03 +01:00
Prometheus Operator Bot
afa74891ca [bot] [main] Automated version update 2021-11-29 07:40:47 +00:00
Paweł Krupa
431b662602 Merge pull request #1497 from paulfantom/k3s-mountpoints 2021-11-28 12:40:10 +01:00
Paweł Krupa
68aaf1cdee Merge pull request #1527 from PhilipGough/bump 2021-11-26 12:59:57 +01:00
Philip Gough
574cdd4df9 make: generate assets 2021-11-26 09:18:26 +00:00
Philip Gough
c098df1c26 jsonnet: jb update 2021-11-26 09:08:00 +00:00
Paweł Krupa
d0c359ba53 Merge pull request #1526 from yaacine/main 2021-11-25 14:04:57 +01:00
yaacine
acced5a95d chore: version update after fixing k8s-resources-workloads-namespace query 2021-11-25 13:25:24 +01:00
Paweł Krupa
974b37e620 Merge pull request #1520 from PaytmLabs/feature/recommended-instance-label 2021-11-25 12:42:03 +01:00
Paweł Krupa
0f6faaacde Merge pull request #1501 from ArthurSens/as/strip-limits-refactor 2021-11-24 13:15:07 +01:00
Maxime Brunet
5e375b394b Use recommended instance label for Prometheus/Alertmanager resources 2021-11-23 13:12:31 -08:00
Paweł Krupa
0a5b89954a Merge pull request #1513 from Obmondo/docfix-install 2021-11-23 10:10:46 +01:00
Paweł Krupa
124eed6c72 Merge pull request #1518 from PaytmLabs/hotfix/addons/scope-values-namespace 2021-11-23 10:03:26 +01:00
Maxime Brunet
80d04a1d53 addons: Always use proper values scope for namespace 2021-11-22 17:10:17 -08:00
Arthur Silva Sens
fcd8d01fa1 Merge pull request #1506 from ArthurSens/as/split-doc-customization
docs/customizations: Move customization examples to dedicated folder
2021-11-22 18:25:56 -03:00
Paweł Krupa
c9ec51090b Merge pull request #1515 from prometheus-operator/automated-updates-main 2021-11-22 11:28:08 +01:00
Prometheus Operator Bot
a9054030d7 [bot] [main] Automated version update 2021-11-22 07:40:23 +00:00
Klavs Klavsen
ebc7f85c2a update to work with Go 1.17+ and default to using 'main' instead of release-0.9 2021-11-19 10:51:53 +01:00
ArthurSens
af00060d9c docs/customizations: Move customization examples to dedicated folder
With the objective of improving our README, customization examples are being moved to a dedicated folder under `docs/`.

Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-11-18 18:57:22 +00:00
Paweł Krupa
b31a075e82 Merge pull request #1508 from andrein/alertmanager-deprecated-inhibition-rules 2021-11-16 16:23:57 +01:00
Andrei Nistor
30175b5e3c Use matchers in routing tree 2021-11-16 14:14:35 +02:00
Andrei Nistor
72f6ff3758 Refactor deprecated inhibit rules matchers 2021-11-15 18:45:19 +02:00
ArthurSens
42e7df4d70 jsonnet/addons/strip-limits: Simplify logic
Since `release-0.8` resources has become a first-class object to all components of kube-prometheus. Therefore, we're simplifying this addon to reflect those changes.

Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-11-15 14:38:15 +00:00
Paweł Krupa
3301107f6a Merge pull request #1505 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2021-11-15 10:22:20 +01:00
Paweł Krupa
36381c4827 Merge pull request #1493 from paulfantom/e2e-reporting
.github/workflows: group all e2e jobs into one job report
2021-11-15 10:18:46 +01:00
Prometheus Operator Bot
cb946bf72e [bot] [main] Automated version update 2021-11-15 07:40:21 +00:00
Paweł Krupa
a7fa98f95c Merge pull request #1490 from paulfantom/contributing 2021-11-12 10:18:21 +01:00
paulfantom
6e50901946 manifests: regenerate 2021-11-10 18:28:42 +01:00
paulfantom
947965d77b jsonnet: exclude k3s containerd mountpoints 2021-11-10 18:27:58 +01:00
paulfantom
2f7a034ee7 split contribution doc into a separate file
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-11-10 10:01:41 +01:00
Arthur Silva Sens
310a74abd2 Merge pull request #1489 from paulfantom/stale-bugs
do not label bugs as stale
2021-11-09 11:57:13 -03:00
Paweł Krupa
aa434f2511 Merge pull request #1488 from zcahana/patch-1 2021-11-09 15:42:19 +01:00
Paweł Krupa
6727dc31a5 Merge pull request #1491 from paulfantom/master-to-main 2021-11-09 15:41:59 +01:00
paulfantom
e8dc839882 .github/workflows: group all e2e jobs into one job report
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-11-09 15:06:21 +01:00
paulfantom
c12a5cf619 *: regenerate
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-11-09 14:55:26 +01:00
paulfantom
33328c7023 jsonnet/kube-prometheus: swap prometheus-operator branch to main 2021-11-09 14:03:44 +01:00
paulfantom
9f8c841237 do not label bugs as stale 2021-11-09 10:50:01 +01:00
Zvi Cahana
35a3b001c4 Update --bind-address flag for minikube deployment example
Updates the Minikube deployment example to use the `--bind-address=0.0.0.0` flags instead of the `--address=0.0.0.0` flag, which has been deprecated for the [kube-scheduler](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-scheduler/), and removed altogether for the [kube-controller-manager](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/).
2021-11-08 18:52:05 +02:00
Paweł Krupa
2c25661fad Merge pull request #1476 from paulfantom/alerting 2021-11-08 11:25:23 +01:00
Paweł Krupa
102d4dc242 Merge pull request #1487 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2021-11-08 09:27:39 +01:00
Prometheus Operator Bot
612a79fda2 [bot] [main] Automated version update 2021-11-08 07:40:26 +00:00
ArthurSens
25d5f86c80 examples/prometheus-agent: Fix broken configurations
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-11-06 20:52:35 +00:00
Arthur Silva Sens
e076461db9 Merge pull request #1481 from paulfantom/stale
.github: introduce stale bot
2021-11-06 16:21:30 -03:00
paulfantom
dbc64a0300 jsonnet: do not hide alerting configuration
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-11-04 12:41:36 +01:00
Arthur Silva Sens
31d86b7946 Merge pull request #1475 from paulfantom/fields-convention
jsonnet: establish convention for components default fields
2021-11-03 14:42:08 -03:00
paulfantom
6573056dee .github: introduce stale bot 2021-11-03 11:21:47 +01:00
paulfantom
9c959bac74 jsonnet: establish convention for components default fields
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-11-02 14:19:04 +01:00
paulfantom
eac0eb5cb1 examples: add example usage of prometheus-agent
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-11-02 09:58:30 +01:00
Paweł Krupa
33b58ae643 Merge pull request #1471 from paulfantom/metadata-management
jsonnet: unify metadata management
2021-11-02 09:39:48 +01:00
Paweł Krupa
151032c8d4 Merge pull request #1469 from paulfantom/update-crd-fix 2021-11-01 21:58:45 +01:00
paulfantom
25d8bb00dc jsonnet: run fmt 2021-11-01 20:07:04 +01:00
paulfantom
6f65cfaac7 manifests: regenerate 2021-11-01 11:30:43 +01:00
paulfantom
40e0687203 jsonnet: code cleanup 2021-11-01 11:30:35 +01:00
paulfantom
96430c94d3 manifests: regenerate 2021-11-01 11:19:43 +01:00
paulfantom
1870702831 jsonnet: unify metadata management 2021-11-01 11:19:34 +01:00
paulfantom
89e81dded1 scripts: modify schemas generator to include changes from https://github.com/prometheus-operator/prometheus-operator/pull/4346
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-11-01 09:17:45 +01:00
Prometheus Operator Bot
94d6c134cd [bot] [main] Automated version update 2021-11-01 07:40:50 +00:00
Paweł Krupa
ba8ec69845 Merge pull request #1463 from andrein/prometheus-adapter
Fix prometheus URL in prometheus-adapter
2021-10-26 16:13:31 +02:00
Andrei Nistor
a6442df06c Fix prometheus URL in prometheus-adapter. 2021-10-26 16:35:37 +03:00
Paweł Krupa
0beb368080 Merge pull request #1462 from paulfantom/node-exporter-default-container 2021-10-25 20:12:18 +02:00
paulfantom
fb00e61602 manifests: regenerate 2021-10-25 16:31:20 +02:00
paulfantom
1a67ab3655 jsonnet: annotate default container for node-exporter DS
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-10-25 16:31:12 +02:00
Arthur Silva Sens
951b90ee29 Merge pull request #1461 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2021-10-25 11:09:57 -03:00
Prometheus Operator Bot
7b0c4193e8 [bot] [main] Automated version update 2021-10-25 07:40:27 +00:00
Paweł Krupa
617bcd2d25 Merge pull request #1451 from BillyMorgan/patch-1 2021-10-25 09:36:56 +02:00
Arthur Silva Sens
701e2970fa Merge pull request #1455 from paulfantom/do-not-hide
jsonnet: do not hide prometheus object
2021-10-24 20:52:31 -03:00
Arthur Silva Sens
e5822ec679 Merge pull request #1457 from paulfantom/fmt
Formatting fix
2021-10-24 20:51:11 -03:00
Blizter
00ab4812c8 update import statement 2021-10-24 09:35:03 -04:00
Blizter
d4b8fff276 import main.libsonnet to allow exmaple generation 2021-10-24 09:34:01 -04:00
Blizter
1ffd6dfb30 let example generate 2021-10-24 09:31:28 -04:00
Blizter
7c748b987b Merge branch 'main' of https://github.com/prometheus-operator/kube-prometheus into example/alertmanager-custom-config 2021-10-23 19:13:54 -04:00
Blizter
24f444fc76 fix typo in local confgimap metadata 2021-10-23 12:39:36 -04:00
paulfantom
1b5e028729 *: format 2021-10-23 14:31:16 +02:00
paulfantom
5c1b660d16 jsonnet: do not hide prometheus object 2021-10-22 14:04:10 +02:00
Paweł Krupa
cd044aa542 Merge pull request #1450 from paulfantom/grafana-refactor
jsonnet: include rewritten kubernetes-grafana library
2021-10-22 11:43:53 +02:00
Paweł Krupa
0bb59980f2 Merge pull request #1453 from saswatamcode/add-mdox 2021-10-21 17:29:08 +02:00
Paweł Krupa
aef85157d7 Merge pull request #1347 from stpabhi/fix-sync-to-internal-registry
fix sync-to-internal-registry.jsonnet
2021-10-21 16:20:36 +02:00
Paweł Krupa
86ce42aa42 Merge pull request #1345 from bgrande12/patch-1
update addon-resizer link
2021-10-21 16:19:30 +02:00
Saswata Mukherjee
7e94f218e1 Add mdox link checking and formatting
Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
2021-10-21 19:12:33 +05:30
Saswata Mukherjee
13cfbe3b3d Setup mdox
Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
2021-10-21 19:12:30 +05:30
Paweł Krupa
0821adabf6 Merge pull request #1425 from raptorsun/bugfix/rule_test 2021-10-21 12:22:27 +02:00
Haoyu Sun
1e632d2ec8 update go-jsonnet for linter bugfix 2021-10-21 11:59:44 +02:00
paulfantom
6aa6b7890d manifests: regenerate 2021-10-21 11:36:48 +02:00
paulfantom
7a6864235d *: bump jsonnet dependencies 2021-10-21 11:36:34 +02:00
Paweł Krupa
10c11d5019 Merge pull request #1341 from dmcnaught/main 2021-10-21 11:14:44 +02:00
Billy
cb5ea1ea44 Incrementing the latest version number 2021-10-21 22:09:02 +13:00
Billy
4626710d2c Update README.md to reflect 0.8 release 2021-10-21 13:14:09 +13:00
paulfantom
ade451bf04 jsonnet: refactor grafana component to include new kubernetes-grafana library 2021-10-20 19:24:39 +02:00
Arthur Silva Sens
ba20f92a0f Merge pull request #1447 from arajkumar/fix-typo-in-gh-actions
Fix typo in jsonnet dependency upgrade GH actions
2021-10-19 08:58:27 -03:00
Arunprasad Rajkumar
19347ed662 Fix typo in jsonnet dependency upgrade GH actions
Replace `commiter` to `committer`.

Refer https://github.com/peter-evans/create-pull-request#action-inputs for more
info about supported input properties for `peter-evans/create-pull-request@v3`.

Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
2021-10-19 16:03:20 +05:30
Damien Grisonnet
af2bc1210d Merge pull request #1446 from paulfantom/prom-op-bot-owner
.github/workflows: automated commits should come from @prom-op-bot account
2021-10-18 17:39:15 +02:00
paulfantom
bddebf8e3d .github/workflows: automated commits should come from @prom-op-bot account 2021-10-18 17:10:55 +02:00
Paweł Krupa
f0359b1189 Merge pull request #1445 from andrein/add_grafana_ldap
Add grafana ldap support (take 2)
2021-10-18 16:54:29 +02:00
Andrei Nistor
882484daf1 add grafana ldap example 2021-10-18 15:33:06 +03:00
machinly
ce7007c568 add grafana ldap support 2021-10-18 15:33:06 +03:00
Damien Grisonnet
aaa5c3358e Merge pull request #1442 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2021-10-18 11:28:33 +02:00
dgrisonnet
fbf9ed0f98 [bot] [main] Automated version update 2021-10-18 07:39:30 +00:00
Paweł Krupa
d0464b2bde Merge pull request #1376 from rajaSahil/Update-Configuration 2021-10-12 14:17:35 +02:00
Damien Grisonnet
2b2af2b974 Merge pull request #1433 from markus-codes/fix/k8s-api-deprication
remove deprecated policy/v1beta1 kubernetes api
2021-10-12 12:01:58 +02:00
Markus Heinemann
f1cff459de fix: upgrade deprecated policy/v1beta1 kubernetes api 2021-10-12 09:00:09 +00:00
Paweł Krupa
2c5bdfe21c Merge pull request #1421 from prometheus-operator/as/parallelize-e2e 2021-10-12 10:55:36 +02:00
Sahil Raja
cbef68e090 Addressed review comments
Signed-off-by: Sahil Raja <sahilraja242@gmail.com>
2021-10-12 09:01:45 +05:30
Sahil Raja
ae89cad60d Made node-exporter args configurable
Signed-off-by: Sahil Raja <sahilraja242@gmail.com>
2021-10-12 09:00:00 +05:30
Arthur Silva Sens
ade7f0d2f1 Merge pull request #1430 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2021-10-11 21:33:54 -03:00
Arthur Silva Sens
3eec2b6d34 Parallelize e2e tests
Signed-off-by: GitHub <noreply@github.com>
2021-10-11 23:36:20 +00:00
Paweł Krupa
a2263c1461 Merge pull request #1422 from raptorsun/feature/selectorUpdateDocEx
replace deprecated "app" label selector with "app.kubernetes.io/name" in documents and examples
2021-10-11 15:24:27 +02:00
dgrisonnet
be3bd2c97b [bot] [main] Automated version update 2021-10-11 07:39:24 +00:00
Haoyu Sun
e7d2135cea replace deprecated "app" label selector by "app.kubernetes.io/name" in
documents and examples
2021-10-08 14:00:52 +02:00
Paweł Krupa
5520900852 Merge pull request #1420 from raptorsun/feature/selectorUpdate 2021-10-06 20:12:37 +02:00
Haoyu Sun
b6c97fc6c0 remove "app" label selector deprecated by prometheus-operator 2021-10-05 19:59:39 +02:00
Damien Grisonnet
167caa3bd7 Merge pull request #1415 from ArthurSens/as/codespace-workspaces
Better ephemeral workspace support with Codespaces
2021-10-05 13:53:04 +02:00
Arthur Silva Sens
16e3663f06 Merge pull request #1417 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2021-10-04 09:14:00 -03:00
dgrisonnet
fe374485a1 [bot] [main] Automated version update 2021-10-04 07:39:27 +00:00
Paweł Krupa
29816093cb Merge pull request #1304 from dgrisonnet/compatibility-doc 2021-10-01 12:32:36 +02:00
ArthurSens
4fe501d7f4 Improve docs for opening Gitpod workspaces
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-09-30 21:48:44 +00:00
Arthur Silva Sens
6239bc017a Better ephemeral workspace support with Codespaces
Signed-off-by: GitHub <noreply@github.com>
2021-09-30 21:00:50 +00:00
Damien Grisonnet
b65faa6a55 Merge pull request #1390 from ArthurSens/as/grafana-e2e-test
Add e2e tests for Grafana deployment
2021-09-30 21:40:16 +02:00
Damien Grisonnet
22e42a48c8 Merge pull request #1414 from ArthurSens/as/fix-extension
Fix jsonnet extension
2021-09-30 21:38:40 +02:00
Damien Grisonnet
50e926f0d4 Merge pull request #1412 from dgrisonnet/add-changelogs
Add changelogs to automated version updates
2021-09-30 21:38:17 +02:00
ArthurSens
57e3af70dc Fix jsonnet extension
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-09-30 19:19:18 +00:00
Arthur Silva Sens
9e83b3cbd0 Add e2e tests for Grafana deployment
Signed-off-by: Arthur Sens <arthursens2005@gmail.com>
2021-09-30 18:09:21 +00:00
Damien Grisonnet
374413f10a Merge pull request #1409 from dgrisonnet/drop-pa-metrics
Drop some of the metrics exposed by prometheus-adapter
2021-09-30 17:45:15 +02:00
Damien Grisonnet
aab8d8eb88 ci: add changelogs to automated version updates
Add the links to the changelogs of the freshly updated components to the
automated PR that does the update. This allow verifying that we are not
missing any important changes before merging the update. This happened
recently with node-exporter 1.2 which changed some flag names that we
took 3 months to update.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-09-30 09:45:56 +02:00
Damien Grisonnet
d7446e6244 Merge pull request #1407 from jan--f/node-exporter-1.2.2-arg-name-change
jsonnet/node-exporter: adjust to node-exporter v1.2.0 arg name change
2021-09-29 18:17:06 +02:00
Damien Grisonnet
5ebbb65276 jsonnet: drop some of prometheus-adapter metrics
The current implementation of prometheus-adapter exposes a lot of
metrics about the health of its aggregated apiserver. The issue is that
the some of these metrics are not very useful in the context of
prometheus-adapter, and we currently can't avoid exposing them since
they are registered to the Kubernetes global Prometheus registry. Until
this is improved in upstream Kubernetes, we could benefit from dropping
some of the metrics that are not very useful.

Before this change, in a default kube-prometheus installation, we would
have 800+ series for prometheus-adapter against 400+, so we divided the
number of series by two will focusing on the most valuable metrics for
prometheus-adapter.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-09-29 13:02:00 +02:00
Jan Fajerski
6fa097c0ed jsonnet/node-exporter: adjust to node-exporter v1.2.0 arg name change
In version [node-exporter v1.2.0](https://github.com/prometheus/node_exporter/releases/tag/v1.2.0)
two argument name changes were introduced. While the old names still
work (with a deprecation warning), lets use the new names.

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2021-09-29 11:15:10 +02:00
Damien Grisonnet
a2eee1803a Merge pull request #1404 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2021-09-28 11:56:30 +02:00
Damien Grisonnet
18287f2bbd Merge pull request #1402 from PhilipGough/cadvisor-metrics-2
Keep 'container_fs_.*' metrics from cAdvisor
2021-09-28 11:13:24 +02:00
simonpasquier
9a3d5d42e1 [bot] [main] Automated version update 2021-09-28 08:41:28 +00:00
Philip Gough
58e2c131c2 Keep 'container_fs_.*' metrics from cAdvisor 2021-09-27 17:13:00 +01:00
Damien Grisonnet
53a2f066d3 Merge pull request #1401 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2021-09-27 12:00:29 +02:00
dgrisonnet
02776a1d37 [bot] [main] Automated version update 2021-09-27 09:53:31 +00:00
Damien Grisonnet
f16bb13c67 Merge pull request #1399 from arajkumar/bump-thanos-mixin
thanos: bump to latest and add `thanosPrometheusCommonDimensions`
2021-09-27 11:12:32 +02:00
Arunprasad Rajkumar
c5d265a14e thanos: bump to latest and add thanosPrometheusCommonDimensions
This commit pulls latest changes from thanos mixins and sets `thanosPrometheusCommonDimensions`
to `namespace, pod` for k8s use case.

Refer https://github.com/thanos-io/thanos/pull/4508 for more details.

Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
2021-09-27 12:07:08 +05:30
Damien Grisonnet
211e758dfe Merge pull request #1396 from PhilipGough/dropped-cadvisor-metrics
Adjust dropped metrics from cAdvisor
2021-09-24 18:43:06 +02:00
Philip Gough
56f96e6389 Adjust dropped metrics from cAdvisor
This change drops pod-centric metrics without a non-empty 'container' label.

Previously we dropped pod-centric metrics without a (pod, namespace) label set
however these can be critical for debugging.
2021-09-24 17:24:01 +01:00
Damien Grisonnet
7f1092cdde Merge pull request #1344 from PhilipGough/MON-1085
jsonnet: Support scraping the config-reloader for AlertManager and Pr…
2021-09-22 16:16:48 +02:00
Philip Gough
7b32afb8aa jsonnet: Support scraping the config-reloader for AlertManager and Prometheus 2021-09-22 14:54:12 +01:00
Damien Grisonnet
44466ff434 Merge pull request #1388 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2021-09-20 16:16:29 +02:00
dgrisonnet
a232cca3b6 [bot] [main] Automated version update 2021-09-20 07:39:09 +00:00
blizter
bdfa78ad6c Merge branch 'master' of github.com:Blizter/kube-prometheus into example/alertmanager-custom-config 2021-09-19 17:27:10 -04:00
Eric
a519249214 Merge branch 'prometheus-operator:main' into master 2021-09-19 17:26:07 -04:00
Arthur Silva Sens
43f7268853 Merge pull request #1373 from spasche/always-generate-grafana-config
Always generate grafana-config secret
2021-09-16 09:33:03 -03:00
Sylvain Pasche
6d5c1b793c Always generate grafana-config secret
Since https://github.com/brancz/kubernetes-grafana/pull/115, upstream
grafana contains a non-empty config. Generate the grafana-config secret
unconditionally even if no user config is passed.
2021-09-16 14:25:53 +02:00
Damien Grisonnet
80632e8962 Merge pull request #1365 from dgrisonnet/kubeconform
Run kubeconform against all  supported versions of Kubernetes
2021-09-13 17:24:23 +02:00
Damien Grisonnet
e220b1019d RELEASE.md: add release instructions
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-09-13 17:20:59 +02:00
Damien Grisonnet
c765d231aa Merge pull request #1375 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2021-09-13 11:26:58 +02:00
dgrisonnet
6654c13142 [bot] [main] Automated version update 2021-09-13 07:39:05 +00:00
Arthur Silva Sens
eeb7c7125d Merge pull request #1371 from dnsmichi/patch-1
Fix import path in 'monitoring other namespaces' docs
2021-09-09 16:47:10 -03:00
Michael Friedrich
679f5a8d9a Update import path for 'monitoring other namespaces' guide
Changed in 42a3ac0606 from `kube-prometheus` to `main`
2021-09-09 21:29:54 +02:00
Damien Grisonnet
bc82275a07 Merge pull request #1364 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2021-09-07 09:39:21 +02:00
dgrisonnet
b663558924 [bot] [main] Automated version update 2021-09-07 07:22:35 +00:00
Damien Grisonnet
6f744e24a5 Merge pull request #1357 from arajkumar/adjust-NodeFilesystemSpaceFillingUp-warning-threshold
Adjust node filesystem space filling up warning threshold to 20%
2021-09-06 19:04:29 +02:00
Damien Grisonnet
76d7cc342b validate: run kubeconform on supported versions
Instead of running kubeconform on only one version of Kubernetes, it
would be better to run it against the 2 latests versions of Kubernetes
that kube-prometheus supports, so that the validation will be in line
with our support policy.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-09-06 18:41:00 +02:00
Arunprasad Rajkumar
4de44139ec add comments to reason fsSpaceFilling threshold adjustment
Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
2021-09-02 17:38:02 +05:30
Lili Cosic
fc136a84f6 Merge pull request #1352 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2021-09-01 15:21:23 +02:00
Arunprasad Rajkumar
16ef18ec54 assets: regenerate
Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
2021-09-01 13:33:41 +05:30
Arunprasad Rajkumar
03471fd86f Adjust threshold for SpaceFillingUp warning alert
Reduce threshold of NodeFilesystemSpaceFillingUp warning alert to 20% space available, instead of 40% (default).

This will align the threshold according to default kubelet GC values
below[1],

"imageMinimumGCAge": "2m0s",
"imageGCHighThresholdPercent": 85,
"imageGCLowThresholdPercent": 80,

[1] https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/

Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
2021-09-01 13:29:36 +05:30
dgrisonnet
a1c6a4e21d [bot] [main] Automated version update 2021-08-30 07:39:09 +00:00
Matthias Loibl
8d0aa1f3d9 Merge pull request #1346 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2021-08-25 23:13:42 +02:00
simonpasquier
eb52023db2 [bot] [main] Automated version update 2021-08-25 09:37:24 +00:00
Abhilash Pallerlamudi
9e8926511f fix sync-to-internal-registry.jsonnet 2021-08-23 12:45:51 -07:00
Ben Luo
8dd7097520 update addon-resizer link
autoscaler repo master branch renamed to main
2021-08-20 09:10:22 -07:00
Damien Grisonnet
996d516363 Merge pull request #1343 from dgrisonnet/post-release-0.9
Follow-up to release 0.9
2021-08-20 14:31:29 +02:00
Damien Grisonnet
46ba787a94 manifests: regenerate
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-08-20 13:52:12 +02:00
Damien Grisonnet
27aa7afe07 .github: add automated updates of release-0.9
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-08-20 13:49:35 +02:00
Damien Grisonnet
9ef6dff167 jsonnet: unpin dependencies
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-08-20 13:49:12 +02:00
Damien Grisonnet
0ca8df7a35 Merge pull request #1338 from dgrisonnet/cut-release-0.9
Cut release 0.9
2021-08-20 13:44:40 +02:00
Duncan McNaught
fbbaea7dd9 1340 kops - set cluster names to match platform 2021-08-19 11:45:01 -06:00
Damien Grisonnet
4cfbfae071 Add release-0.9 CHANGELOG
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-08-19 16:43:34 +02:00
Damien Grisonnet
8587958cf0 Update compatibility matrix with release-0.9
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-08-19 16:43:34 +02:00
Damien Grisonnet
eca67844af jsonnet: pin and update jsonnet depdencies
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-08-19 16:41:53 +02:00
Damien Grisonnet
0df510d1fa Merge pull request #1337 from dgrisonnet/kubernetes-1.22
Test against Kubernetes 1.22
2021-08-18 19:03:21 +02:00
Damien Grisonnet
da35954628 .github: drop support for 1.20 on main
According to our policy, main branch of kube-prometheus should support
the 2 latest versions of Kubernetes. These changes update the tests and
the compatibility matrix to reflect that.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-08-18 17:53:40 +02:00
Damien Grisonnet
b5ec93208b jsonnet: drop deprecated etcd metric
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-08-18 17:27:50 +02:00
Damien Grisonnet
518c37d72d .github: test against Kubernetes 1.22
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-08-18 14:04:33 +02:00
Paweł Krupa
35397089d1 Merge pull request #1334 from dgrisonnet/prometheus-adapter-v0.9.0
Update prometheus-adapter to v0.9.0
2021-08-17 18:31:40 +02:00
Damien Grisonnet
45adc03cfb jsonnet: update prometheus-adapter to v0.9.0
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-08-17 18:05:45 +02:00
Damien Grisonnet
c1fa4971e6 Merge pull request #1325 from paulfantom/fix-1324
jsonnet: set thanos config to null by default
2021-08-17 11:20:47 +02:00
Damien Grisonnet
c69f3b4e62 Merge pull request #1330 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2021-08-17 10:18:47 +02:00
dgrisonnet
6ade9e5c7d [bot] [main] Automated version update 2021-08-17 08:05:49 +00:00
Paweł Krupa
50c9dd2c6f Merge pull request #1326 from dgrisonnet/fix-versions-ci
Fix automated update in CI
2021-08-17 09:08:08 +02:00
Damien Grisonnet
24b0e699e4 .github: fix automated update in CI
Automated dependencies update in CI was failing whenever no new changes
were detected since git diff was returning 1.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-08-16 18:51:30 +02:00
paulfantom
c4113807fb jsonnet: set thanos config to null by default
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-08-16 15:16:52 +02:00
Paweł Krupa
89b57081f7 Merge pull request #1313 from dgrisonnet/enable-auto-updates
.github: enable auto updates on release branches
2021-08-16 10:16:56 +02:00
Paweł Krupa
2e8e88b882 Merge pull request #1320 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2021-08-16 10:12:34 +02:00
paulfantom
ad3fc8920e [bot] [main] Automated version update 2021-08-16 08:04:51 +00:00
Paweł Krupa
8d36d0d707 Merge pull request #1317 from DimitrijeManic/wip/update-doc 2021-08-12 14:14:49 +02:00
Dimitrije Manic
ac75ee6221 Updates prometheus-rules documentation 2021-08-12 08:03:16 -04:00
Paweł Krupa
5452de1b43 Merge pull request #1315 from DimitrijeManic/wip/update-rule-selector 2021-08-11 16:27:38 +02:00
Dimitrije Manic
12cd7fd9ce Prometheus ruleSelector defaults to all rules 2021-08-11 10:16:24 -04:00
Damien Grisonnet
0ffe13c5d2 .github: enable auto updates on release branches
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-08-09 18:59:30 +02:00
Damien Grisonnet
6a150f4cc8 Merge pull request #1310 from paulfantom/full-path
jsonnet: use full dependency path
2021-08-09 17:53:22 +02:00
paulfantom
f6d6b30aed jsonnet: use full dependency path 2021-08-06 14:15:23 +02:00
Damien Grisonnet
33cc694f18 Merge pull request #1308 from PaytmLabs/feature/separate-thanos-rules
Create Thanos Sidecar rules separately from Prometheus ones
2021-08-05 16:19:01 +02:00
Maxime Brunet
961f138dd0 Add back _config.runbookURLPattern for Thanos Sidecar rules 2021-08-04 14:22:06 -07:00
Paweł Krupa
54d8f88162 Merge pull request #1307 from PaytmLabs/feature/addons/aws-vpc-cni
Turn AWS VPC CNI into a control plane add-on
2021-08-04 09:56:50 +02:00
Paweł Krupa
e931a417fc Merge pull request #1230 from Luis-TT/fix-kube-proxy-dashboard 2021-08-04 09:55:09 +02:00
Luis Vidal Ernst
0b49c3102d Added PodMonitor for kube-proxy 2021-08-03 08:31:49 +02:00
Maxime Brunet
0e7dc97bc5 Create Thanos Sidecar rules separately from Prometheus ones 2021-08-02 12:46:06 -07:00
Maxime Brunet
d3ccfb8220 Turn AWS VPC CNI into a control plane add-on 2021-08-02 11:26:33 -07:00
Damien Grisonnet
a330e8634a Merge pull request #1306 from paulfantom/fix-auto
.github: allow dispatching version updates manually and run on predefined schedule
2021-08-02 18:13:44 +02:00
paulfantom
1040e2bd70 .github: allow dispatching version updates manually and run on predefined schedule 2021-08-02 17:53:45 +02:00
Paweł Krupa
c3be50f61f Merge pull request #1303 from dgrisonnet/release-branch-update
Add automated dependency update to the remaining supported release branch
2021-08-02 17:50:28 +02:00
Paweł Krupa
075875e8aa Merge pull request #1298 from prometheus-operator/automated-updates-main
[bot] [main] Automated version update
2021-08-02 17:48:41 +02:00
Damien Grisonnet
9e8d1b0a72 .github: add remaining supported release branch
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-08-02 15:57:57 +02:00
dgrisonnet
e97eb0fbe9 [bot] [main] Automated version update 2021-08-02 13:37:08 +00:00
Paweł Krupa
1eeb463203 Merge pull request #1301 from dgrisonnet/fix-job-skip 2021-08-02 15:20:12 +02:00
Damien Grisonnet
844bdd9c47 .github: fix update version skip on release branch
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-08-02 15:11:41 +02:00
Paweł Krupa
0184f583d8 Merge pull request #1293 from dgrisonnet/release-branch-update 2021-08-02 13:51:59 +02:00
Damien Grisonnet
20f3cfaaeb .github: temporarily switch to manual updates
Temporarily switch to manual dependencies update workflow to test if it
is updated correctly across the different release branch.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-08-02 13:38:33 +02:00
Damien Grisonnet
7542a1b055 .github: automate release branch updates
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-08-02 13:32:32 +02:00
Paweł Krupa
d15f839802 Merge pull request #1292 from PaytmLabs/hotfix/eks/warm-ip-alert
eks: Revert back to `awscni_total_ip_addresses`-based alert
2021-08-02 13:22:13 +02:00
Maxime Brunet
b7fe018d29 eks: Revert back to awscni_total_ip_addresses-based alert 2021-07-31 11:37:12 -07:00
Paweł Krupa
b9c73c7b29 Merge pull request #1283 from prashbnair/node-veth
changing node exporter ignore list
2021-07-28 09:17:03 +02:00
Prashant Balachandran
09fdac739d changing node exporter ignore list 2021-07-27 17:17:19 +05:30
Paweł Krupa
785789b776 Merge pull request #1257 from Luis-TT/kube-state-metrics-kubac-proxy-resources 2021-07-27 12:36:26 +02:00
Paweł Krupa
bbdb21f08d Merge pull request #1282 from lanmarti/main
Add resource requests and limits to prometheus-adapter container
2021-07-27 12:36:01 +02:00
lanmarti
ed48391831 Add resource requests and limits to prometheus-adapter container 2021-07-27 12:19:51 +02:00
Damien Grisonnet
a1a9707f37 Merge pull request #1281 from prometheus-operator/paulfantom-patch-1
Use @prom-op-bot for automatic updates
2021-07-27 11:04:14 +02:00
Paweł Krupa
7b7c346aa0 Use @prom-op-bot for automatic updates 2021-07-27 08:33:08 +02:00
Damien Grisonnet
5f13edd1ea Merge pull request #1279 from prometheus-operator/automated-updates
[bot] Automated version update
2021-07-26 15:59:18 +02:00
paulfantom
05c72f83ef [bot] Automated version update 2021-07-26 13:44:14 +00:00
Paweł Krupa
93d6101bae Merge pull request #1277 from PaytmLabs/hotfix/eks/cni-relabel
eks: Fix CNI metrics relabelings
2021-07-24 11:33:29 +02:00
Maxime Brunet
3a98a3478c eks: Fix CNI metrics relabelings
Signed-off-by: Maxime Brunet <maxime.brunet@paytm.com>
2021-07-23 13:39:29 -07:00
Paweł Krupa
4965e45c15 Merge pull request #1276 from mrueg/fix-typo
node.libsonnet: Fix small typo
2021-07-23 07:44:20 +02:00
Manuel Rüger
acd1eeba4c node.libsonnet: Fix small typo
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2021-07-22 19:14:24 +02:00
Damien Grisonnet
45a466e3a7 Merge pull request #1267 from paulfantom/runbook_urlk
jsonnet/kube-prometheus: point to runbooks.prometheus-operator.dev
2021-07-22 17:40:04 +02:00
Damien Grisonnet
6d9e0fb6b2 Merge pull request #1273 from paulfantom/pr-template
.github: add PR template
2021-07-22 17:35:52 +02:00
paulfantom
755d2fe5c1 manifests: regenerate 2021-07-22 17:31:30 +02:00
paulfantom
cfe830f8f0 jsonnet/kube-prometheus: point to runbooks.prometheus-operator.dev
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-07-22 17:30:57 +02:00
paulfantom
94731577a8 .github: add PR template
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-07-22 17:24:57 +02:00
Luis Vidal Ernst
9c638162ae Allow customizing of kubeRbacProxy in kube-state-metrics 2021-07-21 13:57:05 +02:00
Paweł Krupa
acea5efd85 Merge pull request #1268 from paulfantom/alerts-best-practices
Alerts best practices
2021-07-21 09:32:32 +02:00
Paweł Krupa
cd4438ed02 Merge pull request #1250 from PhilipGough/MON-1741
jsonnet: Drop cAdvisor metrics without (pod, namespace) label pairs.
2021-07-20 14:26:43 +02:00
Philip Gough
463ad065d3 jsonnet: Drop cAdvisor metrics with no (pod, namespace) labels while preserving ability to monitor system services resource usage
The following provides a description and cardinality estimation based on the tests in a local cluster:

container_blkio_device_usage_total - useful for containers, but not for system services (nodes*disks*services*operations*2)
container_fs_.*                    - add filesystem read/write data (nodes*disks*services*4)
container_file_descriptors         - file descriptors limits and global numbers are exposed via (nodes*services)
container_threads_max              - max number of threads in cgroup. Usually for system services it is not limited (nodes*services)
container_threads                  - used threads in cgroup. Usually not important for system services (nodes*services)
container_sockets                  - used sockets in cgroup. Usually not important for system services (nodes*services)
container_start_time_seconds       - container start. Possibly not needed for system services (nodes*services)
container_last_seen                - Not needed as system services are always running (nodes*services)
container_spec_.*                  - Everything related to cgroup specification and thus static data (nodes*services*5)
2021-07-20 12:50:02 +01:00
paulfantom
46eb1713a5 jsonnet: remove unused alert unit tests as those are moved to alertmanager repository 2021-07-20 11:14:38 +02:00
paulfantom
02454b3f53 manifests: regenerate 2021-07-20 11:14:28 +02:00
paulfantom
8c357c6bde jsonnet: align alert annotations with best practices
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-07-20 10:59:49 +02:00
Paweł Krupa
414f8053d3 Merge pull request #1264 from prometheus-operator/automated-updates
[bot] Automated version update
2021-07-19 19:01:52 +02:00
paulfantom
1a3c610c61 [bot] Automated version update 2021-07-19 13:44:23 +00:00
Paweł Krupa
274eba0108 Merge pull request #1253 from ndegory/update-doc-for-0.8
update doc on Prometheus rule updates since release 0.8
2021-07-19 10:09:56 +02:00
Paweł Krupa
99ee030de3 Merge pull request #1259 from PaytmLabs/feature/eks/cni-relabel-instance
eks: Relabel instance with node name for CNI DaemonSet
2021-07-19 10:09:09 +02:00
Paweł Krupa
80bb15bedd Merge pull request #1255 from yeya24/fix-dashboards-definition-length-check 2021-07-19 09:56:09 +02:00
Maxime Brunet
7394929c76 eks: Relabel instance with node name for CNI DaemonSet 2021-07-17 11:28:38 -07:00
Nicolas Degory
9bc6bf3db8 update doc on Prometheus rule updates since release 0.8
Signed-off-by: Nicolas Degory <ndegory@axway.com>
2021-07-14 19:18:07 -07:00
Arthur Silva Sens
ae12388b33 Merge pull request #1256 from surik/update-kubernetes-mixin
Update kubernetes-mixin
2021-07-14 19:56:35 -03:00
Yury Gargay
9b08b941f8 Update kubernetes-mixin
From b710a868a9
2021-07-14 18:51:36 +02:00
ben.ye
43adca8df7 fmt again
Signed-off-by: ben.ye <ben.ye@bytedance.com>
2021-07-13 19:56:38 -07:00
ben.ye
90b2751f06 fmt code
Signed-off-by: ben.ye <ben.ye@bytedance.com>
2021-07-13 19:48:01 -07:00
ben.ye
dee7762ae3 create dashboardDefinitions if rawDashboards or folderDashboards are specified
Signed-off-by: ben.ye <ben.ye@bytedance.com>
2021-07-13 19:39:01 -07:00
Paweł Krupa
3a44309177 Merge pull request #1208 from paulfantom/cleanup 2021-07-08 12:18:36 +02:00
paulfantom
64cfda3012 legal cleanup
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-07-08 11:59:41 +02:00
Damien Grisonnet
97e77e9996 Merge pull request #1231 from dgrisonnet/fix-adapter-queries
Consolidate intervals used in prometheus-adapter CPU queries
2021-07-07 13:48:02 +02:00
Damien Grisonnet
0b3db5b6b6 Merge pull request #1245 from paulfantom/make-update
*: add "update" target to makefile and use it in automatic updater
2021-07-07 13:45:56 +02:00
Paweł Krupa
60b4b3023d Merge pull request #1244 from flurreN/prom-rules-hpa 2021-07-07 10:30:18 +02:00
paulfantom
ed2ffe9d05 *: add "update" target to makefile and use it in automatic updater
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-07-07 10:19:07 +02:00
Philip
3e6865d776 Generate kubernetes-mixin 2021-07-06 17:49:32 +02:00
Paweł Krupa
acd7cdcde0 Merge pull request #1243 from Kolossi/main
apply make fmt fixes to migration readme extracts
2021-07-06 14:01:31 +02:00
Paul Sweeney
552c9ecaea apply make fmt fixes to migration readme extracts 2021-07-06 12:18:07 +01:00
Paweł Krupa
a91ca001a9 Merge pull request #1235 from Kolossi/main
add example release-0.3 to release-0.8 migration to docs
2021-07-06 12:58:22 +02:00
Paul Sweeney
f95eaf8598 make fmt corrections to migration examples 2021-07-06 11:19:33 +01:00
Damien Grisonnet
b9563b9c2d jsonnet: improve adapter queries readability
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-07-05 15:29:45 +02:00
Damien Grisonnet
8812e45501 jsonnet: readjust prometheus-adapter intervals
Previously, prometheus-adapter configuration wasn't taking into account
the scrape interval of kubelet, node-exporter and windows-exporter
leading to getting non fresh results, and even negative results from the
CPU queries when the irate() function was extrapolating data.
To fix that, we want to set the interval used in the irate() function in
the CPU queries to 4x scrape interval in order to extrapolate data
between the last two scrapes. This will improve the freshness of the cpu
usage exposed and prevent incorrect extrapolations.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-07-05 15:28:25 +02:00
Paweł Krupa
3ab3947270 Merge pull request #1224 from sthaha/ignore-nw-eth0
jsonnet: kube-prometheus adapt to changes to veth interfaces names
2021-07-05 14:39:13 +02:00
Paul Sweeney
e77664f325 Update docs/migration-example/my.release-0.8.jsonnet - typo
Co-authored-by: Paweł Krupa <pawel@krupa.net.pl>
2021-07-05 11:43:51 +01:00
Paweł Krupa
496bab92a6 Merge pull request #1233 from sthaha/fix-make-manifests
Fix make manifests not building every time
2021-07-05 12:13:47 +02:00
Paweł Krupa
baf0774e09 Merge pull request #1237 from PhilipGough/ci-test
ci: Use wait command to ensure cluster readiness
2021-07-05 11:02:52 +02:00
Philip Gough
e38bc756a4 ci: Harden action to wait for kind cluster readiness 2021-07-05 09:56:28 +01:00
Paul Sweeney
fadb829b28 add example release-0.3 to release-0.8 migration to docs 2021-07-01 19:40:40 +01:00
Sunil Thaha
86d8ed0004 Fix make manifests not building every time
Make target `manifests` has a dependency on build.sh which if untouched
wouldn't generate the manifests after the first run. This patch fixes it
by removing the `build.sh` dependency

Signed-off-by: Sunil Thaha <sthaha@redhat.com>
2021-07-01 12:10:48 +10:00
Sunil Thaha
0280f4ddf9 jsonnet: kube-prometheus adapt to changes to veth interfaces names
With OVN, the container veth network interface names that used to start
with `veth` has now changed to `<rand-hex>{15}@if<number>`(see Related
Links below).

This patch adapts to the new change introduced in ovn and ignores the network
interfaces that match `[a-z0-9]{15}@if\d+` in addition to those starting
with `veth`

Related Links:
  - https://github.com/openshift/ovn-kubernetes/blob/master/go-controller/vendor/github.com/containernetworking/plugins/pkg/ip/link_linux.go#L107
  - https://github.com/openshift/ovn-kubernetes/blob/master/go-controller/pkg/cni/helper_linux.go#L148

Signed-off-by: Sunil Thaha <sthaha@redhat.com>
2021-07-01 12:01:19 +10:00
Paweł Krupa
f9fd5bd499 Merge pull request #1229 from paulfantom/new-version-only
scripts: use newer version when generating
2021-06-30 11:05:18 +02:00
paulfantom
654aa9bfac scripts: use newer version when generating 2021-06-29 10:08:20 +02:00
Paweł Krupa
ad63d6bb95 Merge pull request #1220 from fpetkovski/auto-update-deps
.github/workflows: automatically update jsonnet dependencies
2021-06-25 13:23:54 +02:00
Paweł Krupa
4a3191fc09 Merge pull request #1227 from fpetkovski/change-versions-update-schedule
.github/workflows: Update versions schedule to run each Monday
2021-06-25 13:23:09 +02:00
fpetkovski
321fa1391c .github/workflows: Update versions schedule to run each Monday 2021-06-25 11:36:50 +02:00
fpetkovski
d9fc85c0bb .github/workflows: automatically update jsonnet dependencies
This commit extends the versions github workflow to automatically update
jsonnet dependencies when the jsonnet code in upstream repositories changes.
2021-06-25 11:30:22 +02:00
Damien Grisonnet
2c5c20cfff Merge pull request #1216 from fpetkovski/prometheus-adapter-cipher-suites
jsonnet: disable insecure cypher suites for prometheus-adapter
2021-06-23 21:19:24 +02:00
Paweł Krupa
7932456718 Merge pull request #1218 from prometheus-operator/automated-updates
[bot] Automated version update
2021-06-23 16:06:21 +02:00
paulfantom
d0e21f34e5 [bot] Automated version update 2021-06-23 13:41:46 +00:00
Paweł Krupa
6ffca76858 Merge pull request #1221 from fpetkovski/update-alertmanager-branch
jsonnet: update alertmanager branch to main
2021-06-23 15:25:57 +02:00
fpetkovski
86b1207e1b jsonnet: update alertmanager branch to main
Alertmanager changed its default branch to main.
This commit updates the alertmanager branch to track the new default.

Signed-off-by: fpetkovski <filip.petkovsky@gmail.com>
2021-06-23 14:25:49 +02:00
Paweł Krupa
875d7cf4e8 Merge pull request #1219 from fpetkovski/update-deps 2021-06-23 13:57:53 +02:00
fpetkovski
0959155a1c jsonnet: update downstream dependencies
This commit updates all downstream dependencies

Signed-off-by: fpetkovski <filip.petkovsky@gmail.com>
2021-06-22 16:27:29 +02:00
fpetkovski
0ff173efea jsonnet: disable insecure cypher suites for prometheus-adapter
Running sslscan against the prometheus adapter secure port reports two
insecure SSL ciphers, ECDHE-RSA-DES-CBC3-SHA and DES-CBC3-SHA.

This commit removes those ciphers from the list.

Signed-off-by: fpetkovski <filip.petkovsky@gmail.com>
2021-06-22 14:17:09 +02:00
Paweł Krupa
94c5301c03 Merge pull request #1217 from PhilipGough/bz-1913618
Sync with kubernetes-mixin
2021-06-22 12:31:31 +02:00
Philip Gough
3a4e292aab Sync with kubernetes-mixin 2021-06-22 11:11:40 +01:00
Paweł Krupa
466eb7953f Merge pull request #1215 from prometheus-operator/automated-updates
[bot] Automated version update
2021-06-18 16:03:32 +02:00
paulfantom
ffea8f498e [bot] Automated version update 2021-06-18 13:50:44 +00:00
Arthur Silva Sens
8396c697fd Merge pull request #1212 from sanglt/main
Fix ingress path rules for networking.k8s.io/v1
2021-06-16 20:58:18 -03:00
Sang Le
4e43a1e16e Fix ingress rules for api networking.k8s.io/v1 - format code 2021-06-17 08:19:23 +10:00
Arthur Silva Sens
071b39477a Merge pull request #1213 from metalmatze/blackbox-exporter-psp
Fix name for blackbox-exporter PodSecurityPolicy
2021-06-16 08:15:16 -03:00
Matthias Loibl
4ea366eef7 Fix name for blackbox-exporter PodSecurityPolicy 2021-06-16 12:55:51 +02:00
Paweł Krupa
8d57b10d50 Merge pull request #1211 from ArthurSens/as/gitpod-k3s
[Gitpod] Deploy kube-prometheus on k3s
2021-06-16 09:50:14 +02:00
Sang Le
db6a513190 Fix ingress rules for api networking.k8s.io/v1 2021-06-16 13:06:32 +10:00
ArthurSens
b7ac30704e Run k3s inside gitpod and deploy kube-prometheus.
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-06-15 13:29:06 +00:00
Damien Grisonnet
836fa4f086 Merge pull request #1209 from paulfantom/test-sh
scripts: move test.sh script into scripts dir
2021-06-15 11:10:16 +02:00
Damien Grisonnet
59918caf8d Merge pull request #1207 from paulfantom/rm-hack
hack: remove unused directory
2021-06-15 11:07:38 +02:00
paulfantom
6dc90593f9 scripts: move test.sh script into scripts dir 2021-06-14 22:47:22 +02:00
paulfantom
253a8ff2d6 hack: remove unused directory 2021-06-14 21:55:40 +02:00
Damien Grisonnet
df4275e3c8 Merge pull request #1206 from prometheus-operator/automated-updates
[bot] Automated version update
2021-06-14 18:19:50 +02:00
paulfantom
d6201759b8 [bot] Automated version update 2021-06-14 13:50:57 +00:00
Paweł Krupa
7d48d055c6 Merge pull request #1205 from adinhodovic/import-managed-cluster-eks
jsonnet/platforms: Import managed-cluster addon for the EKS platform
2021-06-14 12:45:48 +02:00
Adin Hodovic
88034c4c41 jsonnet/platforms: Import managed-cluster addon for the EKS platform 2021-06-14 01:07:18 +02:00
Paweł Krupa
11778868b1 Merge pull request #1202 from prashbnair/kube-mixin 2021-06-12 13:36:39 +02:00
Prashant Balachandran
78a4677370 pulling in changes from kubernetes-mixin
adding changes from kube-mixin
2021-06-12 15:26:37 +05:30
Paweł Krupa
52fa4166d2 Merge pull request #1203 from prometheus-operator/automated-updates 2021-06-12 11:48:56 +02:00
paulfantom
54f79428ce [bot] Automated version update 2021-06-11 13:51:10 +00:00
Paweł Krupa
df197f6759 Merge pull request #1192 from prometheus-operator/automated-updates 2021-06-11 15:47:41 +02:00
Damien Grisonnet
8fada1a219 Merge pull request #1201 from paulfantom/no-grafana
examples: add example of running without grafana deployment
2021-06-11 14:19:19 +02:00
Damien Grisonnet
46922c11c6 Merge pull request #1200 from paulfantom/coredns-selector
jsonnet: fix label selector for coredns ServiceMonitor
2021-06-11 12:44:40 +02:00
paulfantom
859b87b454 examples: add example of running without grafana deployment
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-06-11 11:07:05 +02:00
paulfantom
edc869991d manifests: regenerate 2021-06-11 11:02:21 +02:00
paulfantom
5ea10d80a1 jsonnet: fix label selector for coredns ServiceMonitor 2021-06-11 10:56:54 +02:00
paulfantom
a2cf1acd95 [bot] Automated version update 2021-06-10 13:59:30 +00:00
Paweł Krupa
2afbb72a88 Merge pull request #1193 from ArthurSens/as/alertmanager-dashboard 2021-06-09 21:08:51 +02:00
ArthurSens
f643955034 Update alertmanager mixin
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-06-08 18:19:23 +00:00
Damien Grisonnet
a27f65e910 Merge pull request #1191 from paulfantom/fix-version-updater
.github: write temporary file to /tmp
2021-06-08 12:18:04 +02:00
paulfantom
d45114c73e .github: write temporary file to /tmp 2021-06-08 11:22:25 +02:00
Damien Grisonnet
4d8104817d Merge pull request #1131 from paulfantom/improve-all-namespace
jsonnet: improve all-namespaces addon
2021-06-01 11:00:55 +02:00
paulfantom
feee269fdb jsonnet: improve all-namespaces addon
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-06-01 09:05:07 +02:00
Paweł Krupa
6d603cf7a9 Merge pull request #1142 from faruryo/fix/kubespray-alert
Fix scheduler and controller selectors for Kubespray
2021-05-31 23:14:02 +02:00
Paweł Krupa
dccf2ee085 Merge pull request #1135 from paulfantom/use-common 2021-05-31 23:12:53 +02:00
Paweł Krupa
93cc34f0f6 Merge pull request #1171 from anarcher/pr/grafana-env-1167
feat(grafana): add env parameter for grafana component
2021-05-31 23:11:34 +02:00
Ajit
d57542eae1 Fix for bug #1163 (#1164) 2021-05-31 23:08:59 +02:00
Paweł Krupa
133c274aa9 Merge pull request #1173 from paulfantom/version-update 2021-05-31 22:57:23 +02:00
paulfantom
67f710846a .github: make version update operation atomic 2021-05-31 17:13:35 +02:00
Damien Grisonnet
68b926f643 Merge pull request #1170 from paulfantom/include-versions
scripts: include kube-rbac-proxy and config-reloader in version upgrades
2021-05-31 11:58:28 +02:00
anarcher
8bcfb98a1d feat(grafana): add env parameter for gradana component 2021-05-31 18:52:55 +09:00
paulfantom
e5720038fe scripts: include kube-rbac-proxy and config-reloader in version upgrades 2021-05-31 11:02:19 +02:00
Paweł Krupa
1a39aaa2ab Merge pull request #1166 from paulfantom/version-upgrader-v2 2021-05-31 10:56:57 +02:00
Paweł Krupa
b279e38809 Merge pull request #1129 from onprem/feature-flags 2021-05-31 10:56:39 +02:00
Paweł Krupa
ae48746f3a Merge pull request #1169 from paulportela/patch-1
Fix adding private repository
2021-05-31 10:56:05 +02:00
paulportela
f7baf1599d Fix adding private repository
`imageRepos` field was removed and the project no longer tries to compose image strings. Now the libraries use `$.values.common.images` to override default images.
2021-05-28 17:22:27 -07:00
Prem Saraswat
93282accb7 Generate manifests 2021-05-27 23:21:30 +05:30
Prem Saraswat
228f8ffdad Add support for feature-flags in Prometheus 2021-05-27 23:21:30 +05:30
paulfantom
9b65a6ddce .github: re-enable automatic version upgrader
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-05-27 18:04:12 +02:00
Paweł Krupa
e481cbd7c5 Merge pull request #1162 from paulfantom/deprecated 2021-05-27 12:38:23 +02:00
paulfantom
b10e0c9690 manifests: regenerate 2021-05-27 10:51:14 +02:00
paulfantom
039d4a1e48 jsonnet: sort list of dropped metrics 2021-05-27 10:49:36 +02:00
paulfantom
2873857dc7 jsonnet: convert string of deprecated metrics into array 2021-05-27 10:46:58 +02:00
Paweł Krupa
6c82dd5fc1 Merge pull request #1161 from paulfantom/ci-1.21
Enable tests for kubernetes 1.21
2021-05-27 10:45:57 +02:00
paulfantom
edd0eb639e manifests: regenerate 2021-05-26 12:50:11 +02:00
paulfantom
2fee85eb43 jsonnet: drop storage_operation_errors_total and storage_operation_status_count as those are deprecated in k8s 1.21 2021-05-26 12:49:44 +02:00
paulfantom
e1e367e820 .github: enable e2e tests on k8s 1.21
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-05-26 12:30:53 +02:00
Paweł Krupa
a89da4adb6 Merge pull request #1113 from paulfantom/unpin
Unpin jsonnet dependencies
2021-05-26 11:18:46 +02:00
Paweł Krupa
8f7d2b9c6a Merge pull request #1107 from paulfantom/mixin-add
Improvements in addMixin function.
2021-05-26 11:18:29 +02:00
paulfantom
888443e447 manifests: regenerate 2021-05-25 16:03:49 +02:00
paulfantom
ce7e86b93a jsonnet/kube-prometheus: fix usage of latest thanos mixin 2021-05-25 16:03:39 +02:00
paulfantom
ddfadbadf9 jsonnet: unpin dependencies
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-05-25 16:03:11 +02:00
Paweł Krupa
6134f1a967 Merge pull request #1157 from fpetkovski/update-kubeconform 2021-05-25 15:44:17 +02:00
fpetkovski
5fbdddf92e Update kubeconform to 0.4.7
This change updates the version of kubeconform to 0.4.7. It simplifies the
`validate` Makefile target and extracts the kubernetes version into a variable.
2021-05-25 15:33:47 +02:00
paulfantom
9e00fa5136 docs: regenerate 2021-05-21 11:44:16 +02:00
paulfantom
3197720de6 *: add test of mixin addition in examples/; change config to _config in addMixin to be consistent with main components 2021-05-21 11:43:59 +02:00
Paweł Krupa
b9ecb0a6c6 Merge pull request #1148 from xadereq/fix_missing_resource
jsonnet/components: fix missing resource config in blackbox exporter
2021-05-20 14:37:24 +02:00
Simon Pasquier
eb06a1ab45 Merge pull request #1146 from simonpasquier/fix-ksm-lite-addon
jsonnet/kube-prometheus/addons: fix KSM regex patterns
2021-05-20 09:22:27 +02:00
Piotr Piskiewicz
a8c344c848 jsonnet/components: fix missing resource config in blackbox exporter 2021-05-17 21:32:01 +02:00
Simon Pasquier
e58cadfe96 jsonnet/kube-prometheus/addons: fix KSM regex patterns
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2021-05-17 12:42:43 +02:00
faruryo
babc6b820c Fix scheduler and controller selectors for Kubespray
- refs:https://github.com/prometheus-operator/kube-prometheus/pull/916
- kubespray uses kubeadm, so it is good to inherit it
2021-05-09 23:26:47 +09:00
Paweł Krupa
3b1f268d51 Merge pull request #1140 from paulfantom/config-reloader
jsonnet: use common to populate options for additional objects
2021-05-07 10:00:29 +02:00
paulfantom
f340a76e21 jsonnet/addons: fix config-reloader limits 2021-05-07 09:37:03 +02:00
Paweł Krupa
a1210f1eff Merge pull request #1132 from paulfantom/ruleNamespaceSelector 2021-05-06 23:05:34 +02:00
paulfantom
c2ea96bf4f jsonnet: use common to populate options for additional objects
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-05-05 16:31:36 +02:00
Paweł Krupa
d50b5fd2ea Merge pull request #1136 from dgrisonnet/prometheus-adapter-pdb
Add PodDisruptionBudget to prometheus-adapter
2021-05-05 16:20:49 +02:00
Damien Grisonnet
a4a4d4b744 jsonnet: add PDB to prometheus-adapter
Adding a PodDisruptionBudget to prometheus-adapter ensure that at least
one replica of the adapter is always available. This make sure that even
during disruption the aggregated API is available and thus does not
impact the availability of the apiserver.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-05-05 16:15:25 +02:00
paulfantom
15a8351ce0 manifests: regenerate 2021-05-05 08:57:27 +02:00
paulfantom
ee7fb97598 jsonnet: by default select rules from all available namespaces 2021-05-04 13:20:28 +02:00
Paweł Krupa
e0fb2b7821 Merge pull request #1130 from prometheus-operator/paulfantom-patch-1
addons: hide antiaffinity function
2021-05-04 10:31:37 +02:00
Paweł Krupa
982360b65e addons: hide inline antiaffinity function 2021-05-03 16:01:26 +02:00
Paweł Krupa
e2f1581c37 Merge pull request #1124 from kaflake/feature/configRbacImage 2021-05-03 10:15:44 +02:00
paulfantom
b9a49678b2 jsonnet: fmt 2021-05-03 10:02:45 +02:00
paulfantom
2531c043dc jsonnet: fix conflict resolution 2021-05-03 10:01:37 +02:00
Paweł Krupa
624c6c0108 Merge branch 'main' into feature/configRbacImage 2021-05-03 09:57:23 +02:00
Paweł Krupa
db7f3c9107 Merge pull request #1125 from kaflake/feature/configGrafanaImage
can change grafanaImage over $.values.common.images
2021-05-03 09:55:19 +02:00
Paweł Krupa
4eb52db22c Merge pull request #1123 from kaflake/feature/configmapReloadImage 2021-05-03 09:55:04 +02:00
Paweł Krupa
c45f7377ac Merge pull request #1126 from junaid-ali/patch-1 2021-05-03 09:54:44 +02:00
Nagel, Felix
8c221441d1 fix formatting issues 2021-05-03 07:02:28 +02:00
Nagel, Felix
f107e8fb16 fix formatting issues 2021-05-03 06:59:10 +02:00
Nagel, Felix
14e6143037 replace double quotes with single quotes 2021-05-03 06:35:59 +02:00
Junaid Ali
78b88e1b17 Update README.md 2021-05-01 16:30:03 +01:00
Junaid Ali
80408c6057 Adding release branch URLs to compatibility matrix 2021-05-01 16:28:42 +01:00
Paweł Krupa
5b2740d517 Merge pull request #1114 from dgrisonnet/export-anti-affinity
Export anti-affinity addon
2021-04-30 17:20:01 +02:00
Nagel, Felix
7e5d4196b9 can change grafanaImage over $.values.common.images 2021-04-30 14:05:23 +02:00
Nagel, Felix
5761267842 can change kubeRbacProxy over $.values.common.images 2021-04-30 13:48:34 +02:00
Nagel, Felix
be2964887f can change configmapReload over $.values.common.images 2021-04-30 12:46:48 +02:00
Paweł Krupa
dbf61818fa Merge pull request #1115 from paulfantom/fix-1112
jsonnet: pin alertmanager to specific commit
2021-04-28 10:08:35 +02:00
paulfantom
53efc25b3f jsonnet: pin alertmanager to specific commit as release-0.21 doesn't have mixin directory
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-04-27 22:11:49 +02:00
Damien Grisonnet
fa05e2cde8 jsonnet: export anti-affinity addon
Export the antiaffinity function of the anti-affinity addon to make it
possible to extend the addon to component that are not present in the
kube-prometheus stack.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-04-27 15:30:06 +02:00
Sergiusz Urbaniak
d2f8152a8b Merge pull request #1101 from paulfantom/cut-0.8
*: cut release-0.8
2021-04-27 13:19:03 +02:00
paulfantom
415afa4cc0 *: cut release-0.8
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-04-27 13:08:03 +02:00
Paweł Krupa
984de5fb3d Merge pull request #1111 from Luis-TT/fix-windows-addon-label 2021-04-27 13:07:47 +02:00
Luis Vidal Ernst
419eaf28ce Fixed windows addon example 2021-04-27 12:49:29 +02:00
Luis Vidal Ernst
8c712eaa36 Fixed labels in windows addon 2021-04-27 12:47:23 +02:00
Frederic Branczyk
9d69c4c318 Merge pull request #1103 from paulfantom/anti-affinity-test
examples: add anti-affinity example and include it in readme
2021-04-23 13:50:18 +02:00
Paweł Krupa
63da55bc9f Merge pull request #1102 from superbiche/fix/anti-affinity 2021-04-23 09:38:42 +02:00
paulfantom
cd755f2487 examples: add anti-affinity example and include it in readme 2021-04-23 09:38:23 +02:00
Michel Tomas
dd1b9d00e3 docs: fix outdated anti-affinity docs 2021-04-23 01:19:22 +02:00
Michel Tomas
e9d5221fb7 fix(addons): anti-affinity field does not exist: config 2021-04-23 01:19:05 +02:00
Paweł Krupa
cf039d2222 Merge pull request #1050 from paulfantom/fix827
jsonnet/kube-prometheus: fix jb warning message
2021-04-22 13:08:34 +02:00
Paweł Krupa
a3d67f5219 Merge pull request #1095 from dgrisonnet/prometheus-adapter-ha
Make prometheus-adapter highly-available
2021-04-22 12:00:39 +02:00
Kemal Akkoyun
31189e3a18 Merge pull request #1091 from paulfantom/default-containers
jsonnet: add default container annotation for KSM and blackbox exporter
2021-04-22 11:19:14 +02:00
Damien Grisonnet
4c6a06cf7e jsonnet: make prometheus-adapter highly-available
Prometheus-adapter is a component of the monitoring stack that in most
cases require to be highly available. For instance, we most likely
always want the autoscaling pipeline to be available and we also want to
avoid having no available backends serving the metrics API apiservices
has it would result in both the AggregatedAPIDown alert firing and the
kubectl top command not working anymore.

In order to make the adapter highly-avaible, we need to increase its
replica count to 2 and come up with a rolling update strategy and a
pod anti-affinity rule based on the kubernetes hostname to prevent the
adapters to be scheduled on the same node. The default rolling update
strategy for deployments isn't enough as the default maxUnavaible value
is 25% and is rounded down to 0. This means that during rolling-updates
scheduling will fail if there isn't more nodes than the number of
replicas. As for the maxSurge, the default should be fine as it is
rounded up to 1, but for clarity it might be better to just set it to 1.
For the pod anti-affinity constraints, it would be best if it was hard,
but having it soft should be good enough and fit most use-cases.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-04-22 09:57:14 +02:00
paulfantom
412061ef51 manifests: regenerate 2021-04-21 18:43:01 +02:00
paulfantom
7b69800686 jsonnet: add default container annotation for KSM and blackbox
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-04-21 18:43:00 +02:00
paulfantom
417e8b3f66 jsonnet/kube-prometheus: fix jb warning message
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-04-20 19:18:22 +02:00
Paweł Krupa
752d1a7fdc Merge pull request #1093 from ArthurSens/as/custom-alerts-description 2021-04-20 19:13:48 +02:00
Paweł Krupa
4839afb546 Merge pull request #1100 from jan--f/update-kubernetes-mixins 2021-04-20 15:01:48 +02:00
Jan Fajerski
8b39a459fa update generated assets
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2021-04-20 14:35:31 +02:00
Jan Fajerski
9952e858c7 update kubernetes-mixins
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2021-04-20 14:31:40 +02:00
Paweł Krupa
cf6f5f2801 Merge pull request #1096 from ArthurSens/as/gitpod-githook
Add githook to gitpod.yml that validates fmt and manifests
2021-04-19 08:03:49 +02:00
ArthurSens
b043054974 Add githook to gitpod.yaml that validates fmt and manifests
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-04-16 19:49:10 +00:00
ArthurSens
72b742d7e8 Regenerate manifests
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-04-16 18:06:47 +00:00
ArthurSens
c96c639ef1 Add summary
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-04-16 18:06:47 +00:00
ArthurSens
92016ef68d Change message to description
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-04-16 18:06:47 +00:00
Kemal Akkoyun
0cde11d3fb Merge pull request #1094 from paulfantom/follow-up#1039
jsonnet: fix windows addon
2021-04-16 17:19:59 +02:00
paulfantom
3135cdd70d jsonnet: fix windows addon 2021-04-16 15:12:41 +02:00
Paweł Krupa
07136d1d6e Merge pull request #1039 from paulfantom/unify-config
jsonnet: unify internal configuration field name
2021-04-16 15:05:26 +02:00
Paweł Krupa
8b62749642 Merge pull request #1076 from paulfantom/ksm-lite
reduce KSM cardinality by denylisting unused metrics
2021-04-16 12:36:31 +02:00
Paweł Krupa
0cb0c49186 Merge pull request #1092 from xpepermint/update-versions
Update versions
2021-04-16 08:58:26 +02:00
Kristijan Sedlak
28d58a9dbc Update versions 2021-04-14 20:19:00 +02:00
Paweł Krupa
7a3879ba49 Merge pull request #1070 from ArthurSens/as/psp-respect-common-ns
Psp should be deployed at the same namespace as kube-prometheus stack
2021-04-12 10:31:51 +02:00
Paweł Krupa
9b5b9dccf7 Merge pull request #1080 from markus-codes/main
update customizing kube-prometheus installing section
2021-04-12 09:34:25 +02:00
Paweł Krupa
0306cdc053 Merge pull request #1081 from adinhodovic/document-mixin-lib
Document usage of the mixin library
2021-04-12 09:33:45 +02:00
Adin Hodovic
19801f0709 Document usage of the mixin library 2021-04-10 00:19:17 +02:00
Markus Heinemann
e13f0db3d1 update customizing kube-prometheus installing section
raised the version of kube-prometheus to 0.7 in the customizing
kube-prometheus installing section
2021-04-09 12:42:11 +00:00
Paweł Krupa
1e67c71703 Merge pull request #1072 from dgrisonnet/platform-patch
Allow configuring the platform used directly instead of having to use a patch
2021-04-09 14:29:34 +02:00
Damien Grisonnet
ed5a2f94fc jsonnet: fix test failures with platformPatch
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-04-09 12:59:18 +02:00
Paweł Krupa
eaeb0c6acf Merge pull request #1078 from jan--f/update-kubernetes-mixins 2021-04-09 12:36:01 +02:00
Jan Fajerski
1cefb18e55 update generated manifests
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2021-04-09 11:53:06 +02:00
Jan Fajerski
0c468d534d update kubernetes-mixins
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2021-04-09 11:52:22 +02:00
Paweł Krupa
de3673a286 Merge pull request #1054 from adinhodovic/add-external-mixin-support
jsonnet: Add External mixin lib
2021-04-08 09:11:48 +02:00
Paweł Krupa
874bf089ae Merge pull request #1074 from ArthurSens/as/gitpodfy
Setup gitpod config for ephemeral dev-environments
2021-04-08 09:11:22 +02:00
paulfantom
f81412d05d jsonnet/kube-prometheus/addons: reduce KSM cardinality by denylisting unused metrics
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-04-07 14:23:43 +02:00
Paweł Krupa
2ba8d8aca2 Merge pull request #1058 from mansikulkarni96/windows_exporter 2021-04-07 10:07:33 +02:00
Adin Hodovic
0268128bd1 Add External mixin library
Add library for mixins
2021-04-06 11:59:03 +02:00
Damien Grisonnet
b59b2c23d8 examples: update platform snippets and doc
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-04-06 11:42:29 +02:00
ArthurSens
cf4d2ad524 Setup gitpod config for ephemeral dev-environments
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-04-02 01:34:04 +00:00
mansikulkarni96
1c63b6d021 Add relabel_config to replace endpoint address
This commit adds a relabeling config to the scrape config of
windows-exporter using the 'replace' action field to replace
the node endpoint address with node name. The windows_exporter
returns endpoint target as node IP but we need it to be node name
to use the prometheus adapter queries and collect resource metrics
information.
2021-03-31 13:29:16 -04:00
Damien Grisonnet
f06175bb3b jsonnet: add function to apply platform patches
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-03-31 18:00:04 +02:00
ArthurSens
069f95148f Psp should be deployed at the same namespace as kube-prometheus stack
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-03-30 19:00:12 +00:00
Frederic Branczyk
f5f72e1b50 Merge pull request #1060 from ArthurSens/as/psp-addon-fixes
PodSecurityPolicy uses role instead of clusterRole where posible
2021-03-30 13:33:48 +02:00
mansikulkarni96
7ba0479433 jsonnet: Add windows_exporter queries for adapter
This commit includes windows_exporter metrics in the
node queries for the prometheus adapter configuration.
This will help obtain the resource metrics: memory and
CPU for Windows nodes. This change will also help in
displaying metrics reported through the 'kubectl top'
command which currently reports 'unknown' status for
Windows nodes.
2021-03-29 14:55:11 -04:00
Lili Cosic
dafa0f8edd Merge pull request #1064 from lilic/bump-ksm-rc.1
Bump kube-state-metrics to latest kube-state-metrics rc.1
2021-03-29 15:46:04 +02:00
Lili Cosic
0df93109d4 manifests: Regenerate files 2021-03-29 14:32:08 +02:00
Lili Cosic
17b11ae344 jsonnetfile.lock.json: Bump kube-state-metrics to 2.0.0-rc.1 2021-03-29 14:29:59 +02:00
Lili Cosic
af0719e8d8 Merge pull request #1063 from viperstars/main
add cluster role to list and watch ingresses in "networking.k8s.io"
2021-03-29 13:29:01 +02:00
viperstars
d1f401a73d add cluster role to list and watch ingresses in api group "networking.k8s.io" 2021-03-29 14:19:35 +08:00
Frederic Branczyk
003daae495 Merge pull request #1052 from paulfantom/simplify-managed-cluster-addon
jsonnet/addons: simplify managed-cluster addon
2021-03-26 19:35:22 +01:00
ArthurSens
c9b52c97f5 PodSecurityPolicy uses role instead of clusterRole where posible
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-03-25 20:59:49 +00:00
Paweł Krupa
6497d78f2c Merge pull request #1023 from paulfantom/deps-update 2021-03-25 21:03:56 +01:00
Paweł Krupa
e3dcbb7fa6 Merge pull request #1059 from dgrisonnet/watchdog-example
Update developing examples to use ExampleAlert instead of Watchdog
2021-03-25 20:59:37 +01:00
Damien Grisonnet
8973a90049 examples: use ExampleAlert instead of Watchdog
Replace Watchdog alerts part of the `example-group` in some examples by
ExampleAlert alerts to reinforce the fact that this is just an example.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-03-25 18:11:56 +01:00
paulfantom
c960da64bb manifests: regenerate 2021-03-25 14:22:38 +01:00
paulfantom
35a22050e0 *: update dependencies
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-03-25 14:22:06 +01:00
Paweł Krupa
ea12911e4f Merge pull request #1041 from lilic/ksm-2.0.0-rc.0 2021-03-25 14:18:27 +01:00
Lili Cosic
4bc91a8303 Merge pull request #1057 from jan--f/update-kubernetes-mixins
Update kubernetes mixins
2021-03-25 10:38:55 +01:00
Jan Fajerski
9966c37573 update generated manifests
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2021-03-24 16:52:30 +01:00
Jan Fajerski
4e5087c665 jsonnet: update kubernetes-mixins
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2021-03-24 16:51:54 +01:00
Paweł Krupa
ab554c6ecb Merge pull request #911 from jsturtevant/windows
Windows addon
2021-03-23 09:48:25 +01:00
Paweł Krupa
fe1a446b01 Merge pull request #1019 from dgrisonnet/thanos-image
examples/thanos-sidecar: fix image url
2021-03-23 09:47:05 +01:00
paulfantom
5d2156ffbf jsonnet/addons: simplify managed-cluster addon
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-03-23 09:36:08 +01:00
Paweł Krupa
4d200f29f5 Merge pull request #1022 from lentzi90/update-readme 2021-03-22 13:50:18 +01:00
paulfantom
0bf34a24f8 jsonnet: unify internal configuration field name
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-03-22 12:48:55 +01:00
Paweł Krupa
ed884b0399 Merge pull request #1045 from enkov/main
allow install grafana plugins
2021-03-22 10:17:01 +01:00
Petr Enkov
094cdb34e8 allow install grafana plugins 2021-03-22 11:57:11 +04:00
Paweł Krupa
eacf316f61 Merge pull request #1040 from paulfantom/release-0.6-compat
*: remove statement about release-0.6 compatibility with k8s 1.18
2021-03-19 16:11:51 +01:00
Paweł Krupa
63e20afe98 Merge pull request #1038 from paulfantom/prom-op-0.46 2021-03-19 16:11:41 +01:00
Paweł Krupa
bea6b1a0c2 Merge pull request #1042 from ArthurSens/arthursens/adding-externallabels-86
Add externalLabels to Prometheus defaults
2021-03-19 11:37:46 +01:00
Paweł Krupa
c2ac2a2838 Merge pull request #1010 from ArthurSens/arthursens/add-pod-security-policies-572 2021-03-19 11:27:31 +01:00
ArthurSens
b7d7ba0271 Use node-exporter defaults.port on psp
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-03-18 20:57:48 +00:00
ArthurSens
478a18a6a7 Turn alertmanager's and grafana's roles into clusterRoles
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-03-18 20:57:48 +00:00
ArthurSens
e8abcd3dc9 Allow node-exporter to use hostPath volumes
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-03-18 20:57:48 +00:00
ArthurSens
98559a0f42 Allow kube-state-metrics to run as any user
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-03-18 20:57:48 +00:00
ArthurSens
1237843e62 Adds an addon for podSecurityPolicies
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-03-18 20:57:48 +00:00
ArthurSens
2fa7ef162f Add externalLabels on Prometheus defaults
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-03-18 18:36:10 +00:00
Lili Cosic
09b30e124f manifests: Regenerate 2021-03-18 09:30:35 +01:00
Lili Cosic
4bba284d9b jsonnetfile.lock.json: jb update kube-state-metrics only 2021-03-18 09:30:35 +01:00
Lili Cosic
b473929b36 jsonnet/kube-prometheus/: Bump kube-state-metrics to v2.0.0-rc 2021-03-18 09:30:24 +01:00
Frederic Branczyk
ecd70d66c8 Merge pull request #1037 from paulfantom/prom-adapter-query
jsonnet/prometheus-adapter: include pause container in resource calculations
2021-03-18 08:22:08 +01:00
Lennart Jern
6ece9ca0bc squash! Update README defaults and config 2021-03-18 09:21:35 +02:00
paulfantom
24afd652ab *: remove statement about release-0.6 compatibility with k8s 1.18 2021-03-17 16:06:28 +01:00
Matthias Loibl
41b3f9bafd Merge pull request #1030 from metalmatze/website
Add headers for Hugo website
2021-03-17 09:31:01 +01:00
paulfantom
8b877c1753 manifests: regenerate 2021-03-16 18:48:58 +01:00
paulfantom
70a63d1541 jsonnet: lock prom-op to 0.46 branch 2021-03-16 18:48:48 +01:00
Matthias Loibl
558574b086 Update docs/deploy-kind.md
Co-authored-by: Paweł Krupa <pawel@krupa.net.pl>
2021-03-16 18:21:17 +01:00
Matthias Loibl
d1a3ebbe90 Update docs/deploy-kind.md
Co-authored-by: Paweł Krupa <pawel@krupa.net.pl>
2021-03-16 18:21:02 +01:00
paulfantom
8b30b2b669 manifests: regenerate 2021-03-16 15:19:18 +01:00
paulfantom
0d2e0875d9 jsonnet/prometheus-adapter: include pause container in resource calculations 2021-03-16 15:17:22 +01:00
Matthias Loibl
9a6289a045 Add content header for hugo website 2021-03-16 14:57:51 +01:00
Frederic Branczyk
e4b58eaa5c Merge pull request #1036 from paulfantom/better_pdb
jsonnet: conditionally add PDB
2021-03-16 08:25:13 +01:00
paulfantom
30a41d18d8 jsonnet: conditionally add PDB 2021-03-15 23:39:24 +01:00
Frederic Branczyk
60d5aa25fc Merge pull request #1035 from paulfantom/pdb
Add PodDisruptionBudget objects
2021-03-15 16:43:56 +01:00
paulfantom
9268851d8b *: regenerate 2021-03-15 16:34:29 +01:00
paulfantom
9d327cb328 jsonnet: add PDB to alertmanager and prometheus pods 2021-03-15 16:33:18 +01:00
Paweł Krupa
5516b05926 Merge pull request #1034 from adinhodovic/cleanup-managed-cluster-addon
jsonnet/addons: Cleanup managed cluster addon
2021-03-15 15:51:08 +01:00
Adin Hodovic
db2f6f1acc jsonnet/addons: Cleanup managed cluster addon 2021-03-15 15:05:03 +01:00
Paweł Krupa
578fa2dede Merge pull request #1033 from paulfantom/ksm_version
jsonnet: pick kube-state-metrics version from versions.json file
2021-03-15 14:58:40 +01:00
Paweł Krupa
7c43411531 Merge pull request #1032 from adinhodovic/fix-managed-cluster-addon
Fix managed cluster addon
2021-03-15 14:43:29 +01:00
paulfantom
10f710bb58 jsonnet: pick kube-state-metrics version from versions.json file 2021-03-15 14:38:48 +01:00
Adin Hodovic
24d9633998 Fix managed Cluster addon 2021-03-15 14:23:38 +01:00
Paweł Krupa
4b13b15f2b Merge pull request #1031 from ArthurSens/fix-managed-cluster-addon
Managed-cluster addon shouldn't fully override prometheus object
2021-03-15 09:53:01 +01:00
ArthurSens
5f06f0da5e managed-cluster addon to not fully override prometheus object, only what's necessary
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-03-12 17:55:40 +00:00
Lili Cosic
148fe71cc5 Merge pull request #1028 from lilic/add-warning
docs/migration-guide.md: Add label changes warning
2021-03-12 15:42:11 +01:00
Lili Cosic
f5ed97771c docs/migration-guide.md: Add label changes warning 2021-03-12 15:25:03 +01:00
Lennart Jern
b40fe984b3 Update README defaults and config 2021-03-12 07:53:45 +02:00
Paweł Krupa
44008b2682 Merge pull request #1018 from dgrisonnet/thanos-sidecar
Cleanup thanos-sidecar addon imports
2021-03-10 11:56:06 +01:00
Paweł Krupa
3eab50538a Merge pull request #1017 from paulfantom/bot
Disable version updater
2021-03-10 11:55:37 +01:00
Damien Grisonnet
9f6c7d7654 examples/thanos-sidecar: fix image url
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-03-10 11:47:57 +01:00
Damien Grisonnet
816c73acc6 examples: cleanup thanos-sidecar addon imports
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-03-10 10:59:59 +01:00
paulfantom
8834c2d5e0 .github: disable version updater
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-03-10 10:59:04 +01:00
paulfantom
e3db1c174e scripts: fail if version generator cannot retrieve currently used version 2021-03-10 10:49:16 +01:00
Matthias Loibl
8e5bf00c54 Merge pull request #984 from paulfantom/am_resources
jsonnet/alertmanager: add default alertmanager resource requirements
2021-03-08 10:20:20 +01:00
Paweł Krupa
5f13d38155 Merge pull request #1007 from ArthurSens/arthursens/missing-runbook-url-1001 2021-03-05 15:36:04 +01:00
ArthurSens
bb2971e874 Add runbook_url annotation for custom mixins
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-03-05 14:07:01 +00:00
ArthurSens
e586afb280 Add runbook_url annotation to all alerts
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-03-05 13:39:40 +00:00
Paweł Krupa
9785c3bb68 Merge pull request #1002 from paulfantom/versions
jsonnet,scripts: better version updater
2021-03-05 14:02:42 +01:00
paulfantom
16c05d16e2 jsonnet,scripts: better version updater 2021-03-05 10:36:58 +01:00
James Sturtevant
6961da9b90 Update docs/windows.md
Co-authored-by: Andrew Purdin <44270026+andrewpurdin@users.noreply.github.com>
2021-03-03 08:13:36 -08:00
Paweł Krupa
ebd4b28b91 Merge pull request #985 from prometheus-operator/automated-dependencies-update
Autoupdate dependencies
2021-03-03 15:27:09 +01:00
s-urbaniak
654283a048 Auto-updated dependencies 2021-03-03 08:38:39 +00:00
Frederic Branczyk
e3346b8fce Merge pull request #994 from paulfantom/ci
.github: do not persist credentials on checkout
2021-03-02 16:13:46 +01:00
paulfantom
f8c92f0428 .github: do not persist credentials on checkout 2021-03-02 13:57:37 +01:00
Paweł Krupa
a9961b8f6e Merge pull request #992 from paulfantom/am-rules
Better name for alertmanager prometheusRule object
2021-03-01 13:42:14 +01:00
paulfantom
e13ec2e448 manifests: regenerate 2021-03-01 13:27:17 +01:00
paulfantom
f7f817a79e jsonnet/alertmanager: better name for prometheus-rule object 2021-03-01 13:26:46 +01:00
Paweł Krupa
60826aa71d Merge pull request #991 from paulfantom/creds
.github/workflows: do not persist credentials
2021-03-01 13:21:52 +01:00
paulfantom
9c38152dbb .github/workflows: do not persist credentials 2021-03-01 11:20:21 +01:00
James Sturtevant
d9ac51aed0 Windows addon
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2021-02-26 10:09:27 -08:00
paulfantom
d753169176 manifests: regenerate 2021-02-25 18:52:31 +01:00
paulfantom
23c8d865f5 jsonnet/alertmanager: add default alertmanager resource requirements
Co-authored-by: Latch M <latch_mihaylov@homedepot.com>
2021-02-25 18:51:34 +01:00
Lili Cosic
dff8d8c11c Merge pull request #983 from paulfantom/updater
fix version updating CI job
2021-02-25 16:02:02 +01:00
paulfantom
ebef4e02ef fix version updating CI job 2021-02-25 15:41:56 +01:00
Sergiusz Urbaniak
aecfa970c9 Merge pull request #978 from paulfantom/open-main
Open `main` branch - refactoring is finished
2021-02-24 17:06:58 +01:00
paulfantom
6acc4f6569 docs: migration guide
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-02-24 14:56:51 +01:00
Paweł Krupa
1d2a0e275a Merge pull request #971 from paulfantom/auto-updates
*: allow automatic updates of installed components
2021-02-23 17:59:42 +01:00
paulfantom
c88d18c9d2 *: allow automatic updates of installed components
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-02-23 14:24:55 +01:00
Paweł Krupa
55b6848b42 Merge pull request #967 from paulfantom/ksm-1.9.8 2021-02-23 14:21:30 +01:00
paulfantom
c229d9d34c manifests: regenerate 2021-02-23 12:09:07 +01:00
paulfantom
c0a136a4c7 jsonnet: bump KSM to 1.9.8 and use multi-arch images 2021-02-23 12:07:49 +01:00
Paweł Krupa
70cb4c10cd Merge pull request #961 from PaytmLabs/feature/anti-affinity/soft-hard-topologykey
addons/anti-affinity: Support soft/hard podAntiAffinity and topologyKey
2021-02-23 10:31:18 +01:00
Paweł Krupa
f691421c91 Merge pull request #960 from paulfantom/k8s-control-plane
Do not modify $.prometheus object when it is not needed (k8s control plane)
2021-02-23 10:30:17 +01:00
Frederic Branczyk
da05d36c31 Merge pull request #941 from paulfantom/ksm-krp-cpu
increase default CPU values for main kube-rbac-proxy sidecar in kube-state-metrics
2021-02-23 09:50:16 +01:00
paulfantom
390f2d72db manifests: regenerate 2021-02-23 09:36:35 +01:00
paulfantom
7c95f88a2b jsonnet: increase default CPU values for main krp sidecar in ksm
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-02-23 09:36:24 +01:00
Maxime Brunet
32bfeea94f addons/anti-affinity: Support soft/hard podAntiAffinity and topologyKey 2021-02-22 16:23:02 -08:00
paulfantom
66e4a7ba15 *: regenerate 2021-02-22 16:38:34 +01:00
paulfantom
bf9a917cfa examples: adapt examples to stop modifying prometheus object when it is not needed 2021-02-22 16:38:19 +01:00
paulfantom
5d06e286ca examples: adapt examples to use k8s-control-plane component 2021-02-22 16:38:07 +01:00
paulfantom
57730b757e jsonnet/kube-prometheus/platforms: adapt platform addons to use new k8s-control-plane component 2021-02-22 16:36:39 +01:00
paulfantom
c80a82b19a jsonnet/kube-prometheus: create k8s control plane component
* Extract ServiceMonitors related to k8s control plane from prometheus
object into separate one
* Add kubernetes-mixin to new object

Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-02-22 16:36:14 +01:00
Paweł Krupa
bc1026ae2b Merge pull request #956 from PaytmLabs/feature/prometheus/unique-servicemonitor
Ensure Prometheus ServiceMonitor is unique
2021-02-22 08:39:47 +01:00
Maxime Brunet
f039fc94cf Ensure Prometheus ServiceMonitor is unique 2021-02-19 17:09:52 -08:00
Frederic Branczyk
d909241c4a Merge pull request #954 from phanirithvij/patch-1
jsonnet needs to be mentioned here
2021-02-19 12:44:31 +01:00
Frederic Branczyk
8daef560ea Merge pull request #920 from paulfantom/prober-anti-affinity
anti-affinity addon should also affect blackbox exporter
2021-02-19 12:39:45 +01:00
paulfantom
1817baccf1 jsonnet: antiaffinity addon should also affect blackbox exporter
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-02-19 10:28:27 +01:00
Paweł Krupa
daad0e1fae Merge pull request #925 from shreyashah1903/fix-kubelet-label
kubelet: Update label selector
2021-02-19 10:19:35 +01:00
Phani Rithvij
a51f690387 jsonnet needs to be mentioned here 2021-02-19 01:56:08 +05:30
Frederic Branczyk
bd0cc5675c Merge pull request #912 from aisbaa/patch-1
Include build.sh and example.jsonnet download
2021-02-18 14:51:27 +01:00
Frederic Branczyk
d0c746d64b Merge pull request #949 from paulfantom/readme
*: add badges to readme
2021-02-18 13:49:21 +01:00
paulfantom
99838deb5d *: add badges to readme 2021-02-18 13:10:48 +01:00
Sergiusz Urbaniak
0c25559b39 Merge pull request #940 from paulfantom/prometheus-rule-name
jsonnet: better name for prometheus PrometheusRule object
2021-02-15 09:41:12 +01:00
paulfantom
0fbf8e03e0 manifests: regenerate 2021-02-12 09:40:22 +01:00
paulfantom
cff8fec592 jsonnet: better name for prometheus PrometheusRule object 2021-02-12 09:40:14 +01:00
Kemal Akkoyun
2a66bb88b5 Merge pull request #929 from paulfantom/thanos-fix
Do not include thanos config when thanos is not used.
2021-02-11 15:35:37 +01:00
Kemal Akkoyun
d283e67059 Merge pull request #932 from paulfantom/etcd-mixin
etcd mixin changed place
2021-02-11 14:56:16 +01:00
paulfantom
83441715a8 jsonnet: etcd mixin changed place
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-02-11 13:26:00 +01:00
paulfantom
e40e42cf72 manifests: regenerate 2021-02-10 12:07:32 +01:00
paulfantom
30d3d5950d jsonnet: do not include thanos field when not needed
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-02-10 12:06:43 +01:00
Shreya Shah
ff3e0e1ee4 Update kubelet label selector 2021-02-09 17:52:54 +05:30
Paweł Krupa
de2d1b5231 Merge pull request #919 from paulfantom/node-exporter-1.1.0
bump node-exporter to 1.1.0 and remove deprecated flag
2021-02-08 16:50:36 +01:00
paulfantom
fc1a03053d manifests: regenerate 2021-02-06 19:58:55 +01:00
paulfantom
4245ded81b jsonnet: bump node-exporter to 1.1.0 and remove deprecated flag 2021-02-06 19:58:45 +01:00
Paweł Krupa
2ff04a63a3 Merge pull request #907 from paulfantom/grafana-v2
jsonnet/grafana: re-map datasources and config
2021-02-05 16:59:31 +01:00
paulfantom
a9dd864c67 jsonnet/grafana: re-map datasources and config
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-02-05 16:49:41 +01:00
Lili Cosic
73db89874e Merge pull request #914 from paulfantom/typo
jsonnet: remove superfluous quotation mark
2021-02-05 16:48:13 +01:00
Paweł Krupa
18630eaca1 Merge pull request #909 from paulfantom/thanos-sidecar-follow-up
First-level support for thanos sidecar
2021-02-04 16:37:10 +01:00
paulfantom
f8bae9fd96 manifests: regenerate 2021-02-04 14:43:23 +01:00
paulfantom
0b0b967764 jsonnet: thanos sidecar as first-level addon
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-02-04 14:43:16 +01:00
paulfantom
11aa604d39 manifests: regenerate 2021-02-04 10:49:03 +01:00
paulfantom
6dfd6d891c jsonnet: remove superfluous quotation mark 2021-02-03 16:41:58 +01:00
Aistis Jokubauskas
90298f8f5c Include build.sh and example.jsonnet download
I've tripped on this while trying to compile kube-prometheus manifests. 

Ref: https://github.com/prometheus-operator/kube-prometheus/issues/902
2021-02-03 09:32:56 +02:00
Kemal Akkoyun
1384b847f4 Merge pull request #906 from paulfantom/thanos-sidecar
fix thanos-sidecar addon
2021-02-02 13:56:41 +01:00
paulfantom
f95f0fa875 examples,jsonnet: fix thanos-sidecar addon; add test for thanos-sidecar addon 2021-02-02 13:36:10 +01:00
Paweł Krupa
e3cd00e01a Merge pull request #904 from paulfantom/dashboarding_issues
Dashboarding issues
2021-02-02 11:09:11 +01:00
paulfantom
9c93c7aeee docs: regenerate 2021-02-02 10:24:15 +01:00
paulfantom
ab3dff2016 examples,jsonnet: expose kubernetes-grafana API to fix grafana examples
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-02-02 10:24:07 +01:00
Paweł Krupa
6758acbb30 Merge pull request #900 from simonpasquier/switch-apiv2-alerting
Default alerting to Alertmanager API v2
2021-02-02 09:46:05 +01:00
Simon Pasquier
102d4c6513 Default alerting to Alertmanager API v2
Alertmanager API v2 is available for more than 2 years now, there's no
reason to not use it by default.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2021-01-29 15:57:16 +01:00
Kemal Akkoyun
8588e30bd0 Merge pull request #898 from paulfantom/validation
*: add resource validation
2021-01-29 15:22:00 +01:00
paulfantom
3670d5bf7d *: add resource validation
Co-Authored-By: Yann Hamon <yann.hamon@contentful.com>
Co-Authored-By: Kemal Akkoyun <kakkoyun@gmail.com>
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-01-29 12:25:28 +01:00
Paweł Krupa
40c1c7a190 Merge pull request #885 from lanmarti/hotfix/884
Changed labels for grafana service monitor selector
2021-01-29 10:48:19 +01:00
Paweł Krupa
c2155fa206 Merge pull request #893 from johanneswuerbach/k8s-prometheus-adapter-v0.8.3
k8s-prometheus-adapter v0.8.3
2021-01-28 14:32:28 +01:00
Johannes Würbach
0a79177c19 k8s-prometheus-adapter v0.8.3 2021-01-28 10:24:42 +01:00
Paweł Krupa
6081b306c2 Merge pull request #894 from jimmidyson/configmap-reload-cve
jsonnet: Upgrade configmap-reload image to v0.5.0 to fix CVE
2021-01-28 10:11:01 +01:00
Jimmi Dyson
5b6f50ffb2 jsonnet: Upgrade configmap-reload image to v0.5.0 to fix CVE 2021-01-27 10:56:44 +00:00
Frederic Branczyk
dd8fdd68fe Merge pull request #892 from paulfantom/easier_images
jsonnet: move all images and versions into values.common
2021-01-27 10:43:47 +01:00
paulfantom
07a057f09d manifests: regenerate to fix grafana version label 2021-01-26 15:43:55 +01:00
paulfantom
7afbfa3534 jsonnet: move all images and versions into values.common
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-01-26 15:43:40 +01:00
Paweł Krupa
ab8132a33d Merge pull request #890 from paulfantom/no_veth
remove virtual interfaces from node_exporter metrics
2021-01-25 15:02:22 +01:00
paulfantom
4220f4e862 manifests: regenerate
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-01-25 14:52:25 +01:00
paulfantom
d3ad5de993 jsonnet/kube-promethues/components: remove veth interfaces from node_exporter metrics
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-01-25 14:49:13 +01:00
lanmarti
5cefc105f7 Ran make generate 2021-01-25 13:04:49 +01:00
lanmarti
70cfe27872 Added quotes around label key 2021-01-25 13:03:05 +01:00
lanmarti
ff3e611245 Changed labels for grafana service monitor selector 2021-01-25 13:03:05 +01:00
Paweł Krupa
1bf4381117 Merge pull request #875 from paulfantom/directory-layout
Simplify directory structure
2021-01-21 18:36:21 +01:00
Paweł Krupa
a89a364ece Merge pull request #882 from paulfantom/deps 2021-01-21 11:50:10 +01:00
paulfantom
9bba0e2a2a manifests: regenerate 2021-01-21 10:34:21 +01:00
paulfantom
6d8e56727c jsonnet: update dependencies 2021-01-21 10:32:55 +01:00
paulfantom
e2dbc63764 format and regenerate 2021-01-19 15:46:51 +01:00
paulfantom
0424835b04 jsonnet/addons: update removal of resource limits for certain containers 2021-01-19 15:46:34 +01:00
paulfantom
4132da532c jsonnet/addons: fix autoscaler 2021-01-19 15:46:00 +01:00
paulfantom
fe81e7de56 jsonnet: fix thanos example 2021-01-19 15:45:18 +01:00
paulfantom
4f9d464087 examples,jsonnet: fix weave-net 2021-01-19 15:44:56 +01:00
paulfantom
625ab137fa regenerate 2021-01-19 13:56:26 +01:00
paulfantom
2913c866bb fix references to old variables and to other files
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-01-19 13:56:20 +01:00
Kemal Akkoyun
66b5416bf6 Merge pull request #880 from lilic/remove-owners
OWNERS: This file is superseded by github team under the org
2021-01-18 18:53:49 +03:00
paulfantom
b70eb1c49c jsonnet: move kops-coredns to platforms 2021-01-18 16:41:59 +01:00
paulfantom
369730b701 jsonnet: move ksm--autoscaler to addons 2021-01-18 16:41:19 +01:00
Lili Cosic
828cbbbea4 OWNERS: This file is superseded by github team under the org 2021-01-18 14:32:18 +01:00
paulfantom
42a3ac0606 regenerate
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-01-15 15:30:28 +01:00
paulfantom
cbddf907db examples: adjust tests 2021-01-15 15:23:24 +01:00
paulfantom
1eedb90c17 jsonnet: move files around
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-01-15 15:07:10 +01:00
Paweł Krupa
75f918067d Merge pull request #873 from paulfantom/separate-mixins 2021-01-15 14:32:50 +01:00
paulfantom
092b22d62b regenerate 2021-01-15 11:58:04 +01:00
paulfantom
d4c48539a0 jsonnet: fix too much nesting of data in PrometheusRules
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-01-15 11:57:57 +01:00
paulfantom
f1bd7af657 jsonnet: helmize :)
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-01-15 11:35:32 +01:00
paulfantom
5624c5a9a8 jsonnet: refactor the rest of mixins and grafana inclusion
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-01-15 10:46:51 +01:00
paulfantom
86d4571aea jsonnet: remove grafana global state 2021-01-14 18:38:43 +01:00
paulfantom
e556dbfd88 jsonnet: add separated kubernetes mixin and custom kube prometheus alerts 2021-01-14 16:58:14 +01:00
paulfantom
ba052559cf jsonnet: separate mixins into components
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-01-14 15:58:07 +01:00
Paweł Krupa
24496d1fac Merge pull request #870 from paulfantom/prom-op-globals
Remove mutating global state in prometheus-operator objects
2021-01-14 13:28:10 +01:00
paulfantom
b67686409e jsonnet: remove wrapping prometheus-operator lib 2021-01-14 13:19:39 +01:00
paulfantom
255cd9a1c5 manifests: regenerate 2021-01-13 16:59:48 +01:00
paulfantom
7335ac40d0 jsonnet: remove unused kube-rbac-proxy config and helper lib 2021-01-13 16:59:39 +01:00
paulfantom
bed5cc8efb jsonnet/kube-prometheus: use refactored upstream prometheus-operator library 2021-01-13 16:59:15 +01:00
paulfantom
e2c50fa40f jsonnet: update prometheus-operator dependency 2021-01-13 16:45:00 +01:00
Paweł Krupa
e02cc471f5 Merge pull request #869 from paulfantom/prometheus-globals
Remove mutating global state in prometheus objects
2021-01-13 10:07:38 +01:00
paulfantom
5dcb5de788 manifests: regenerate 2021-01-13 09:59:29 +01:00
paulfantom
9cf2ce9ffc jsonnet: create function responsible for prometheus objects
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-01-13 09:59:03 +01:00
Paweł Krupa
6b11d79c4b Merge pull request #871 from paulfantom/mixins-global
Remove mutating global state in monitoring mixins imports
2021-01-13 09:39:34 +01:00
paulfantom
b4fcf8f6cc jsonnet: fix copy-paste errors, format, and lint
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-01-13 09:15:42 +01:00
paulfantom
55900d9e1c jsonnet: wrap mixins into a function and parametrize
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-01-13 09:13:47 +01:00
paulfantom
5f9b222c41 jsonnet: remove dead code 2021-01-13 09:13:46 +01:00
paulfantom
18e804217a manifests: regenerate 2021-01-13 09:13:45 +01:00
paulfantom
6e132e4490 jsonnet: refactor monitoring mixins imports 2021-01-13 09:13:44 +01:00
Paweł Krupa
4c1ff463db Merge pull request #812 from paulfantom/jsonnet-lint 2021-01-12 16:11:54 +01:00
paulfantom
d00a923299 jsonnet: format 2021-01-12 16:03:13 +01:00
paulfantom
b5ab602911 jsonnet: lint 2021-01-12 15:21:56 +01:00
paulfantom
48579a9679 .github/workflows: run fmt and lint in CI 2021-01-12 15:19:44 +01:00
paulfantom
ecbaa85d81 *: add jsonnet-lint to tooling
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-01-12 15:19:43 +01:00
Paweł Krupa
e255923c05 Merge pull request #868 from paulfantom/kube-state-metrics-globals 2021-01-12 15:19:10 +01:00
Paweł Krupa
2ce2c80a48 Merge pull request #872 from johanneswuerbach/patch-1
Fix service names in kube-prometheus-kops
2021-01-12 13:03:18 +01:00
Johannes Würbach
7828570118 Fix service names in kube-prometheus-kops 2021-01-12 11:55:48 +01:00
paulfantom
a76135a9f9 manifests: regenerate 2021-01-07 17:35:30 +01:00
paulfantom
2eed12b2b7 jsonnet: create function responsible for kube-state-metrics objects
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-01-07 17:35:07 +01:00
Paweł Krupa
4b47de57f8 Merge pull request #863 from paulfantom/blackbox-global
Remove mutating global state in blackbox-exporter objects
2021-01-07 11:39:50 +01:00
paulfantom
1c06faf207 manifests: regenerate 2021-01-07 11:33:11 +01:00
paulfantom
09ce4afca8 jsonnet: create function responsible for blackbox-exporter objects 2021-01-07 11:33:08 +01:00
Paweł Krupa
5ca429157f Merge pull request #864 from paulfantom/prometheus-adapter-global
Remove mutating global state in prometheus-adapter objects
2021-01-07 11:31:47 +01:00
paulfantom
f2686477f4 manifests: regenerate to fix version number 2021-01-07 11:20:41 +01:00
paulfantom
d4999048fc jsonnet: create function responsible for prometheus-adapter objects 2021-01-07 11:20:39 +01:00
Paweł Krupa
6248e73890 Merge pull request #862 from paulfantom/alertmanager-global
Remove mutating global state in alertmanager objects
2021-01-07 11:13:25 +01:00
paulfantom
d9b40073d4 manifests: regenerate to include better alertmanager version 2021-01-07 09:11:34 +01:00
paulfantom
ea3fee466e jsonnet: create function responsible for alertmanager objects
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-01-07 09:11:13 +01:00
Paweł Krupa
a36c6042e5 Merge pull request #857 from paulfantom/globals_experiment_1
Remove mutating global state in node-exporter objects
2021-01-07 09:08:59 +01:00
paulfantom
3b7d4690ba add information about code refactoring to readme 2021-01-05 16:14:17 +01:00
paulfantom
630bc31183 jsonnet: do not compose image string for node-exporter 2021-01-05 16:11:37 +01:00
paulfantom
da817040c6 manifests: regenerate to fix version number 2021-01-05 15:16:10 +01:00
paulfantom
5b8feb783c jsonnet: create function responsible for node-exporter objects 2021-01-05 15:15:44 +01:00
paulfantom
19376df824 jsonnet: move kube-rbac-proxy mixin to separate file 2021-01-05 15:14:43 +01:00
Frederic Branczyk
808c2f8c3d Merge pull request #858 from brancz/fix-kubelet-label
kubelet: Revert label selector
2021-01-04 16:53:56 +01:00
Frederic Branczyk
cf916082b8 kubelet: Revert label selector
The Kubelet's Service/Endpoints object maintained by the Prometheus
Operator does not have the recommended app label (yet). Therefore we
need to use the old label until a Prometheus Operator version has been
released and integrated in kube-promteheus that does use it.
2021-01-04 16:45:27 +01:00
Frederic Branczyk
a4306c9c7a Merge pull request #855 from brancz/bb-ipv4
blackbox-exporter: Prefer ipv4 by default in probe config
2021-01-04 11:27:53 +01:00
Frederic Branczyk
b1dda44501 blackbox-exporter: Prefer ipv4 by default in probe config 2021-01-04 11:01:45 +01:00
Frederic Branczyk
1928f7083a Merge pull request #852 from brancz/probe-port
blackbox-exporter: Add probe port to Service
2021-01-04 11:01:13 +01:00
Frederic Branczyk
6501366ff8 blackbox-exporter: Add probe port to Service 2021-01-04 10:17:05 +01:00
Frederic Branczyk
2984ca585c Merge pull request #844 from paulfantom/hostpid
node-exporter: do not mount /proc as it is covered by hostPID
2020-12-31 12:16:39 +01:00
Frederic Branczyk
06d7df8075 Merge pull request #843 from paulfantom/labels-part2
jsonnet: add missing labels
2020-12-31 12:16:06 +01:00
Frederic Branczyk
b0e2449a8b Merge pull request #778 from tpalfalvi/blackbox-exporter
install a blackbox-exporter instance
2020-12-31 12:15:10 +01:00
PÁLFALVI Tamás
5083ae2e89 regenerate manifests 2020-12-30 23:12:45 +01:00
PÁLFALVI Tamás
dcd99f7d68 set up authorization for blackbox-exporter 2020-12-30 23:02:25 +01:00
PÁLFALVI Tamás
66aca04688 monitor blackbox-exporter over https 2020-12-30 23:02:25 +01:00
PÁLFALVI Tamás
eda90b6833 put blackbox-exporter behind kube-rbac-proxy 2020-12-30 23:02:25 +01:00
PÁLFALVI Tamás
97aaa1f534 accept formatting changes made by jsonnetfmt 2020-12-30 22:50:20 +01:00
PÁLFALVI Tamás
8b4effaba0 update examples and regenerate manifests 2020-12-30 22:50:20 +01:00
PÁLFALVI Tamás
8d53477ec8 put the service monitor for the blackbox exporter in the configured namespace 2020-12-30 22:50:20 +01:00
PÁLFALVI Tamás
c2fb1f4208 include the blackbox exporter mixin by default 2020-12-30 22:50:20 +01:00
PÁLFALVI Tamás
b39b1bfcfc install a blackbox-exporter instance 2020-12-30 22:50:20 +01:00
paulfantom
4f306fc3ff manifests: regenerate 2020-12-18 14:18:02 +01:00
paulfantom
41e3f7d03f node-exporter: do not mount /proc as it is covered by hostPID 2020-12-18 14:17:07 +01:00
paulfantom
f36b68458d manifests: regenerate 2020-12-18 11:32:12 +01:00
paulfantom
723ac0fd27 jsonnet: add missing labels
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2020-12-18 11:32:03 +01:00
Paweł Krupa
09ca49fce0 Merge pull request #832 from paulfantom/labels 2020-12-17 16:29:44 +01:00
paulfantom
af0465fd79 manifests: regenerate 2020-12-16 11:10:15 +01:00
paulfantom
ee553a708d jsonnet: replace all k8s-app labels with app.kubernetes.io/name 2020-12-16 11:07:29 +01:00
paulfantom
3830bc8076 jsonnet: add recommended k8s labels 2020-12-16 11:07:14 +01:00
Lili Cosic
7d7d40b4de Merge pull request #831 from dgrisonnet/bump-grafana-v7.3.5
Bump grafana to v7.3.5
2020-12-11 14:33:02 +01:00
Damien Grisonnet
d37a299499 jsonnet,manifests: bump grafana to v7.3.5
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2020-12-11 14:19:29 +01:00
Lili Cosic
407ced0d9f Merge pull request #828 from dgrisonnet/cut-release-0.7
Cut release-0.7
2020-12-10 13:57:15 +01:00
Frederic Branczyk
20c3894b5f Merge pull request #829 from simonpasquier/update-prom-op-v0.44.1
Update prometheus-operator to v0.44.1
2020-12-10 10:41:46 +01:00
Damien Grisonnet
6a05efd636 Cut release-0.7
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2020-12-10 09:55:20 +01:00
Simon Pasquier
68b78e84c9 Update prometheus-operator to v0.44.1
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-12-10 09:42:32 +01:00
Paweł Krupa
0cfe5bba45 Merge pull request #825 from lilic/bump-prom-operator-0.44 2020-12-07 12:20:48 +01:00
Lili Cosic
9593d5c457 manifests: Regenerate 2020-12-07 12:00:36 +01:00
Lili Cosic
6f67548eec jsonnetfile.lock.json: Run jb update 2020-12-07 11:56:00 +01:00
Lili Cosic
456b87c3f1 jsonnet/kube-prometheus/jsonnetfile.json: Bump prometheus-operator to 0.44 2020-12-07 11:54:25 +01:00
Frederic Branczyk
8eac39f35d Merge pull request #823 from paulfantom/alertmanager-mixin
use alertmanager-mixin instead of alerts baked in kube-prometheus
2020-12-04 10:48:11 +01:00
Frederic Branczyk
fe771c0108 Merge pull request #822 from brancz/fix-affinity
jsonnet: Fix affinity order dependency
2020-12-04 10:20:21 +01:00
paulfantom
c45a81999e *: regenerate 2020-12-04 10:13:18 +01:00
paulfantom
d4ca837790 use alertmanager-mixin instead of alerts baked in kube-prometheus 2020-12-04 10:11:31 +01:00
Frederic Branczyk
ca2f2d5e61 jsonnet: Fix affinity order dependency 2020-12-04 10:10:05 +01:00
Frederic Branczyk
af67589d2a Merge pull request #821 from brancz/gke
Add GKE patch
2020-12-04 09:51:54 +01:00
Frederic Branczyk
d748fe4d96 Add GKE patch 2020-12-04 09:22:49 +01:00
Frederic Branczyk
25f88e8132 Merge pull request #819 from alam0rt/use-awscni-ip-max-metric
make the alert rule better represent the alert
2020-12-02 09:47:28 +01:00
Samuel Lockart
6fb6cae970 Revert "following contributer steps"
This reverts commit e0358a4b26.
2020-12-02 15:10:01 +11:00
Samuel Lockart
e0358a4b26 following contributer steps
* Update the pinned kube-prometheus dependency in jsonnetfile.lock.json: `jb update`
* Generate dependent *.yaml files: make generate
2020-12-01 09:37:22 +11:00
Samuel Lockart
c02e0c0e31 make the alert rule better represent the alert 2020-12-01 09:18:31 +11:00
Paweł Krupa
4b690d4a5c Merge pull request #818 from naphta/feature/update-dashboards
Update grafana dashboards and prometheus rules from kubernetes-mixin
2020-11-30 12:24:16 +01:00
Jake Hill
91fc8c92c2 Sync kubernetes-mixin
Updated to fix doubled CPU issue; https://github.com/kubernetes-monitoring/kubernetes-mixin/pull/456

Signed-off-by: Jake Hill <jake@naphta.uk>
2020-11-30 11:18:08 +00:00
Frederic Branczyk
5282761710 Merge pull request #816 from simonpasquier/add-thanos-sidecar-alerts
Add Thanos sidecar alerts
2020-11-27 18:08:00 +01:00
Frederic Branczyk
79f4232513 Merge pull request #815 from simonpasquier/fix-thanos-sidecar
Thanos sidecar: use fields from the prometheus object
2020-11-27 18:07:34 +01:00
Simon Pasquier
874be477b4 Thanos sidecar: use fields from the prometheus object
Instead of name and namespace fields coming from the global config.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-11-27 17:05:55 +01:00
Simon Pasquier
297b6817a4 Add Thanos sidecar alerts
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-11-27 15:18:31 +01:00
Paweł Krupa
409add16d4 Merge pull request #814 from paulfantom/grafana 2020-11-27 11:10:43 +01:00
paulfantom
17cbb1bf85 manifests: regenerate 2020-11-27 10:28:09 +01:00
paulfantom
d2f051745e jsonnet/kube-prometheus: update grafana version to 7.3.4 2020-11-27 10:27:53 +01:00
Blizter
a01820692c example external custom alertmanager template 2020-11-26 12:54:35 -05:00
Frederic Branczyk
37107791d4 Merge pull request #811 from kakkoyun/fix_anti_affinity
Fix wrong indentation for affinity rule
2020-11-26 14:11:40 +01:00
Frederic Branczyk
41a973d0cf Merge pull request #803 from paulfantom/kube-rbac-proxy-uid
Fix kube rbac proxy UID and GID
2020-11-26 14:09:29 +01:00
Frederic Branczyk
1c11c1b092 Merge pull request #801 from paulfantom/jsonnet-0.17
upgrade to jsonnet v0.17.0
2020-11-26 14:07:44 +01:00
Lili Cosic
45dbb278be Merge pull request #810 from lilic/add-kemal
OWNERS: Add kakkoyun to the reviewers section
2020-11-26 11:11:23 +01:00
Kemal Akkoyun
6ec37c8be6 Fix wrong indentation for affinity rule
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-26 12:48:48 +03:00
Frederic Branczyk
6b9502c5f4 Merge pull request #805 from paulfantom/runbooks
jsonnet/kube-prometheus: change runbook urls to point to wiki
2020-11-26 10:39:14 +01:00
Lili Cosic
3522d642aa OWNERS: Add kakkoyun to the reviewers section 2020-11-25 15:48:41 +01:00
Sergiusz Urbaniak
b9c95f02f1 Merge pull request #796 from paulfantom/cpu_steal
CPU steal time shouldn't be counted into CPU usage
2020-11-25 14:25:40 +01:00
Lili Cosic
29d590b65a Merge pull request #808 from mikekamornikov/KP-795
Update Grafana to the latest minor version (7.1.5)
2020-11-25 14:00:43 +01:00
Mike Kamornikov
469523e572 make generate 2020-11-25 15:53:08 +03:00
Mike Kamornikov
a05f39b65d bump grafana version to 7.1.5 2020-11-25 15:50:11 +03:00
paulfantom
f6cfaa0fb1 manifests: regenerate 2020-11-23 13:20:30 +01:00
paulfantom
d2fb1de1d2 jsonnet/kube-prometheus: change runbook urls to point to wiki 2020-11-23 13:20:19 +01:00
Sergiusz Urbaniak
0534d14813 Merge pull request #800 from kehao95/external-metrics
Provide external-metrics as an add-on
2020-11-23 12:41:17 +01:00
Paweł Krupa
d7eadef17d Merge pull request #794 from kakkoyun/ksonnet_no_more_16
Remove ksonnet from prometheus/prometheus.libsonnet
2020-11-23 11:45:15 +01:00
Paweł Krupa
93e4b70d2c Merge pull request #799 from kakkoyun/ksonnet_no_more_19
Remove last ksonnet reference and direct dependency
2020-11-23 11:44:48 +01:00
Paweł Krupa
2a3981b75c Merge pull request #798 from kakkoyun/ksonnet_no_more_18
Remove ksonnet from kube-prometheus/kube-prometheus.libsonnet
2020-11-23 11:44:25 +01:00
Paweł Krupa
47412b3037 Merge pull request #797 from kakkoyun/ksonnet_no_more_17
Remove ksonnet from prometheus-adapter/prometheus-adapter.libsonnet
2020-11-23 11:41:30 +01:00
paulfantom
20fa80fb4c manifests: regenerate 2020-11-23 11:28:14 +01:00
paulfantom
befa960a1e jsonnet/kube-prometheus: kube-rbac-proxy should run as UID 65532 2020-11-23 11:26:47 +01:00
paulfantom
30c04b88ff upgrade to jsonnet v0.17.0 2020-11-22 16:36:20 +01:00
Hao Ke
916b0ef90e provide external-metrics addon 2020-11-20 13:44:51 -05:00
Kemal Akkoyun
a82a5b1d35 Remove last ksonnet reference and direckt dependency
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-20 17:11:47 +01:00
Kemal Akkoyun
28d661a5fc Fix formatting
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-20 17:10:42 +01:00
Kemal Akkoyun
2138463b1f Remove ksonnet from kube-prometheus/kube-prometheus.libsonnet
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-20 17:01:44 +01:00
Kemal Akkoyun
6430acf980 Remove ksonnet from prometheus-adapter/prometheus-adapter.libsonnet
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-20 16:49:34 +01:00
Kemal Akkoyun
31185dc8aa Address review issues
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-20 16:08:40 +01:00
paulfantom
fe9507b510 manifests: regenerate 2020-11-20 12:23:01 +01:00
paulfantom
87ddb30a41 jsonnet: do not count CPU steal time in CPU usage rules 2020-11-20 12:18:14 +01:00
Paweł Krupa
7f50004133 Merge pull request #793 from kakkoyun/ksonnet_no_more_15
Remove ksonnet from node-exporter/node-exporter.libsonnet
2020-11-20 10:19:57 +01:00
Simon Pasquier
2cc09fb2a6 Merge pull request #788 from simonpasquier/add-support-doc
Add instructions for community support
2020-11-19 09:41:07 +01:00
Kemal Akkoyun
5a610adc8c Remove ksonnet from prometheus/prometheus.libsonnet
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-18 17:39:46 +01:00
Kemal Akkoyun
5005f4ac2e Remove ksonnet from node-exporter/node-exporter.libsonnet
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-18 16:49:47 +01:00
Simon Pasquier
77f1ad3b1c Add instructions for community support
This change documents where to find documentation and support for the
various components of kube-prometheus.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-11-18 14:24:41 +01:00
Lili Cosic
e667d85de8 Merge pull request #760 from kakkoyun/ksonnet_no_more_3
Remove ksonnet from jsonnet/kube-prometheus
2020-11-18 10:16:42 +01:00
Paweł Krupa
b75a8a2efa Merge pull request #781 from philschleier/master
Revert kubeadm selector and replace nodePort
2020-11-16 14:27:19 +01:00
Paweł Krupa
f674b1b557 Merge pull request #787 from aweris/go-version-1.15
Go version 1.15
2020-11-16 14:25:58 +01:00
Ali Akca
2a49d0f8aa Do not export GO111MODULE 2020-11-16 13:50:45 +01:00
Ali Akca
1b12e6882d Migrate tool dependencies to scripts/go.mod 2020-11-16 13:50:43 +01:00
Ali Akca
c123d87347 Bump go version to 1.15 2020-11-16 13:48:31 +01:00
Paweł Krupa
64fd5ac304 Merge pull request #786 from kakkoyun/fix_typo
Fix typo that introduced in recent ksonnet removal
2020-11-16 13:41:45 +01:00
Paweł Krupa
09eb11bdbb Merge pull request #769 from kakkoyun/ksonnet_no_more_12 2020-11-16 13:41:10 +01:00
Kemal Akkoyun
c90d8a02a9 Address review issues
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-16 09:20:44 +01:00
Kemal Akkoyun
8d8c45c4dd Remove ksonnet from kube-prometheus
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-16 09:12:00 +01:00
Kemal Akkoyun
739200dea3 Fix typo
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-16 09:03:35 +01:00
Ali Akca
ead1c35fac Replace go install with go build -o in $TOOLING rule 2020-11-12 23:42:54 +01:00
Philipp Schleier
c14fc2a709 Fix kubeadm selector and nodePort 2020-11-12 17:35:41 +01:00
Blizter
8b3fb3e2c5 removing ksonnet 2020-11-12 10:05:26 -05:00
Blizter
36536cfdf0 Merge branch 'master' of github.com:prometheus-operator/kube-prometheus 2020-11-12 09:49:57 -05:00
Paweł Krupa
aff0ef6582 Merge pull request #780 from simonpasquier/update-setup-kind-action
.github: update version of engineerd/setup-kind
2020-11-12 12:03:18 +01:00
Simon Pasquier
38daabf6e0 .github: update version of engineerd/setup-kind
See https://github.com/engineerd/setup-kind/issues/28 for details.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-11-12 09:47:56 +01:00
Frederic Branczyk
f321584df7 Merge pull request #777 from johanneswuerbach/k8s-prometheus-adapter-v0.8.2
k8s-prometheus-adapter v0.8.2
2020-11-12 09:18:27 +01:00
Johannes Würbach
f579d8c065 k8s-prometheus-adapter v0.8.2 2020-11-11 21:27:51 +01:00
Frederic Branczyk
6f7cf5cf72 Merge pull request #740 from underrun/prom_adapter_ns_change
enable alternate namespace for prometheus adapter
2020-11-11 16:44:04 +01:00
Derek Wilson
170296603a add prometheus adapter ns to custom metrics
becauase otherwise these will be in different places
2020-11-11 15:28:06 +00:00
Derek Wilson
4dc68103b9 fix prometheus namespace
mistaken change of namespace for where prometheus is deployed
2020-11-11 15:21:55 +00:00
Derek Wilson
07188b2509 enable alternate namespace for prometheus adapter
because choice is nice to have
2020-11-11 15:21:55 +00:00
Frederic Branczyk
4bbc92bf15 Merge pull request #773 from simonpasquier/detect-many-to-many-errors
tests/e2e: add test to detect many-to-many errors
2020-11-11 10:54:12 +01:00
Frederic Branczyk
b0acdc7b86 Merge pull request #770 from kakkoyun/ksonnet_no_more_13
Remove ksonnet from kube-rbac-proxy/container.libsonnet
2020-11-11 10:48:12 +01:00
Frederic Branczyk
6e6bd49f7f Merge pull request #768 from kakkoyun/ksonnet_no_more_11
Remove ksonnet from alertmanager.libsonnet
2020-11-11 10:47:57 +01:00
Frederic Branczyk
6ba3f6a6c8 Merge pull request #767 from kakkoyun/ksonnet_no_more_10
Remove ksonnet from kube-prometheus-weave-net.libsonnet
2020-11-11 10:47:19 +01:00
Frederic Branczyk
01b396efc5 Merge pull request #766 from kakkoyun/ksonnet_no_more_9
Remove ksonnet from kube-prometheus-thanos-sidecar.libsonnet
2020-11-11 10:46:55 +01:00
Frederic Branczyk
ea51bdb6eb Merge pull request #764 from kakkoyun/ksonnet_no_more_7
Remove ksonnet from several libs
2020-11-11 10:46:39 +01:00
Frederic Branczyk
ef04c0c114 Merge pull request #763 from kakkoyun/ksonnet_no_more_6
Remove ksonnet from kube-prometheus-eks.libsonnet
2020-11-11 10:46:12 +01:00
Frederic Branczyk
90f811411b Merge pull request #762 from kakkoyun/ksonnet_no_more_5
Remove ksonnet from kube-prometheus-custom-metrics.libsonnet
2020-11-11 10:44:13 +01:00
Frederic Branczyk
5f9eac9008 Merge pull request #761 from kakkoyun/ksonnet_no_more_4
Remove ksonnet from kube-prometheus-bootkube.libsonnet
2020-11-11 10:43:23 +01:00
Frederic Branczyk
432411ba33 Merge pull request #759 from kakkoyun/ksonnet_no_more_2
Remove ksonnet from prometheus-pvc.jsonnet
2020-11-11 10:41:46 +01:00
Simon Pasquier
a8fe172085 tests/e2e: add test to detect many-to-many errors
It happened quite a few times that some queries failed when Prometheus
scrapes metrics from 2 kube-state-metrics instances. This situation can
happen briefly when the kube-state-metrics instance is rolled out. It
might also be more apparent when automatic sharding of
kube-state-metrics is enabled.

https://github.com/kubernetes-monitoring/kubernetes-mixin/pull/306
https://github.com/kubernetes-monitoring/kubernetes-mixin/pull/361

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-11-10 17:25:56 +01:00
Paweł Krupa
e1b9f0ea9e Merge pull request #754 from paulfantom/krp-0.8.0 2020-11-09 16:17:09 +01:00
Lili Cosic
a54498482c Merge pull request #765 from kakkoyun/ksonnet_no_more_8
Remove ksonnet from kube-prometheus-static-etcd.libsonnet
2020-11-09 16:00:51 +01:00
paulfantom
9f5f14bfe0 manifests: regenerate 2020-11-09 15:39:58 +01:00
paulfantom
373441cce9 jsonnet/kube-prometheus: update kube-rbac-proxy version 2020-11-09 15:38:14 +01:00
Lili Cosic
c10fda45b1 Merge pull request #771 from simonpasquier/bump-prometheus-operator-0.43.2
Update prometheus-operator to v0.43.2
2020-11-09 14:17:39 +01:00
Simon Pasquier
0788ab7978 Update prometheus-operator to v0.43.2
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-11-09 12:44:26 +01:00
Lili Cosic
08b577c898 Merge pull request #758 from kakkoyun/ksonnet_no_more_1
Remove ksonnet from ksonnet-example.jsonnet
2020-11-09 09:54:59 +01:00
Lili Cosic
3a47f2d20e Merge pull request #757 from kakkoyun/ksonnet_no_more_0
Remove ksonnet from ingress.jsonnet
2020-11-09 09:54:06 +01:00
Kemal Akkoyun
491dbd2f74 Remove ksonnet from alertmanager.libsonnet
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-06 18:20:04 +01:00
Kemal Akkoyun
fcf7d8afa2 Remove ksonnet from kube-rbac-proxy/container.libsonnet
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-06 18:12:23 +01:00
Kemal Akkoyun
05744ccfc3 Remove ksonnet from ksm-autoscaler.libsonne
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-06 17:58:57 +01:00
Kemal Akkoyun
283e28fe20 Remove ksonnet from kube-prometheus-weave-net.libsonnet
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-06 16:38:35 +01:00
Kemal Akkoyun
8c71e8c804 Remove ksonnet from kube-prometheus-thanos-sidecar.libsonnet
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-06 16:21:24 +01:00
Kemal Akkoyun
9a82d41cfa Remove ksonnet from kube-prometheus-static-etcd.libsonnet
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-06 16:17:21 +01:00
Kemal Akkoyun
116a42ae7a Remove ksonnet from several libs
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-06 15:46:40 +01:00
Kemal Akkoyun
207a133233 Update ingress API
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-06 15:13:37 +01:00
Kemal Akkoyun
922fe4571e Remove ksonnet from kube-prometheus-eks.libsonnet
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-06 15:07:21 +01:00
Kemal Akkoyun
7da6b04785 Remove ksonnet from jsonnet/kube-prometheus/kube-prometheus-custom-metrics.libsonnet
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-06 15:00:47 +01:00
Kemal Akkoyun
f274702ece Remove ksonnet from jsonnet/kube-prometheus/kube-prometheus-bootkube.libsonnet
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-06 14:43:19 +01:00
Kemal Akkoyun
c236fec779 Remove ksonnet from prometheus-pvc.jsonnet
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-06 14:14:59 +01:00
Kemal Akkoyun
9d051b2c63 Remove ksonnet from ksonnet-example.jsonnet
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-06 14:08:44 +01:00
Kemal Akkoyun
b84bd5c72f Update docs
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-06 12:27:20 +01:00
Kemal Akkoyun
4b9f8bb107 Remove ksonnet from ingress.jsonnet
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
2020-11-06 12:20:32 +01:00
Simon Pasquier
6d641706de Merge pull request #753 from simonpasquier/bump-prometheus-operator-0.43.1
Update prometheus-operator to v0.43.1
2020-11-05 14:51:25 +01:00
Simon Pasquier
eea76c5272 Update prometheus-operator to v0.43.1
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-11-04 17:34:29 +01:00
Paweł Krupa
8b0eebdd08 Merge pull request #744 from paulfantom/compatibility
update compatibility matrix for release-0.6
2020-10-28 13:54:21 +01:00
paulfantom
369cd81d14 update compatibility matrix 2020-10-28 10:51:12 +01:00
Simon Pasquier
fb5ae888e7 Merge pull request #743 from simonpasquier/bump-prometheus-operator
Update prometheus-operator to v0.43.0
2020-10-28 10:29:27 +01:00
Simon Pasquier
945fcce5c4 Update prometheus-operator to v0.43.0
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-10-28 09:53:51 +01:00
Blizter
468e63267b adding missing brace 2020-10-27 15:53:09 -04:00
Blizter
9e87d405ba Example of 1 ingress routing to many applications 2020-10-27 11:50:02 -04:00
Lili Cosic
0c2a69e492 Merge pull request #737 from johanneswuerbach/k8s-prometheus-adapter-v0.8.0
Bump k8s-prometheus-adapter to v0.8.0
2020-10-26 14:40:02 +01:00
Johannes Würbach
71b7931c9d Bump k8s-prometheus-adapter to v0.8.0 2020-10-26 14:00:23 +01:00
Lili Cosic
aee7f28bcd Merge pull request #736 from lilic/pin-release
Pin kube-state-metrics to last stable release branch
2020-10-23 13:29:55 +02:00
Lili Cosic
08550c2db8 *: Regenerate 2020-10-23 11:44:26 +02:00
Lili Cosic
0118932183 jsonnet/kube-prometheus/jsonnetfile.json: Pin ksm to last release branch 2020-10-23 11:41:44 +02:00
Paweł Krupa
e4ebb8f55b Merge pull request #732 from searsaw/patch-1
Add print to find
2020-10-22 15:02:21 +02:00
Alex Sears
fae7e1a987 Add print to find
The `find` call in the Makefile doesn't actually output any `*.libsonnet` file due to the way `find` handles operators. This was discovered using GNU `find` on a Mac. From the manpages:

> Please  note  that -a when specified implicitly (for example by two tests appearing without an explicit operator between them) or explicitly has higher precedence than -o.  This means that find . -name afile -o -name bfile -print will never print afile.

A simple addition of `-print` to force the print fixes the issue.
2020-10-21 15:38:46 -04:00
Lucas Servén Marín
414d15c895 Merge pull request #730 from seanttierney/patch-1
Update README.md
2020-10-20 21:57:43 +02:00
Sean Tierney
9764726cf0 Update README.md
fix typo.
2020-10-20 14:25:26 -05:00
Paweł Krupa
3b38fcc350 Merge pull request #729 from paulfantom/node-rules
bump node-exporter rules to latest version
2020-10-19 15:10:26 +02:00
paulfantom
95a4414caf bump node-exporter rules to latest version 2020-10-19 14:00:44 +02:00
Simon Pasquier
895dcbe1a7 Merge pull request #728 from simonpasquier/udpate-prometheus-2.22
jsonnet/kube-prometheus: update Prometheus dependency to v2.22.0
2020-10-19 13:50:47 +02:00
Simon Pasquier
9a3e639345 jsonnet/kube-prometheus: update Prometheus dependency to v2.22.0 2020-10-19 12:29:48 +02:00
Frederic Branczyk
980e95de01 Merge pull request #699 from brancz/update-ne
node-exporter: Update to v1.0.1
2020-10-02 17:45:22 +02:00
Frederic Branczyk
491ecfa65b node-exporter: Update to v1.0.1 2020-10-02 17:40:10 +02:00
Frederic Branczyk
09239aaa49 Merge pull request #698 from brancz/ro-mounts
node-exporter: Make host mounts read only and set mount propagation
2020-10-02 17:36:44 +02:00
Frederic Branczyk
eda75c7c39 node-exporter: Make host mounts read only and set mount propagation 2020-10-02 17:29:20 +02:00
Frederic Branczyk
9cbafdb812 Merge pull request #695 from paulfantom/cadvisor
ignore timestamps from cadvisor metrics
2020-10-02 14:26:14 +02:00
Frederic Branczyk
45e2cd1248 Merge pull request #693 from jessebye/master
Sync up with upstream dependencies
2020-10-02 14:24:44 +02:00
paulfantom
1e8a60ea57 manifests: regenerate 2020-10-01 10:22:32 +02:00
paulfantom
ea21375f15 jsonnet/kube-prometheus/prometheus: ignore timestamps from cadvisor 2020-10-01 10:20:40 +02:00
Jesse Bye
f0755dcaa8 jb update 2020-09-30 14:04:09 -07:00
Frederic Branczyk
ad4462e506 Merge pull request #689 from SayakMukhopadhyay/docs-all-namespace-mixin
docs: Added documentation for monitoring all namespaces and stripping container limits
2020-09-28 13:39:54 +02:00
Sayak Mukhopadhyay
3adc752839 docs: Added documentation for limit stripping of containers 2020-09-24 18:36:11 +05:30
Sayak Mukhopadhyay
5ffed9f9ba Added item in the TOC 2020-09-24 18:15:16 +05:30
Sayak Mukhopadhyay
714275f3b9 docs: Added documentation for monitoring all namespaces 2020-09-24 17:55:09 +05:30
Frederic Branczyk
f2a014c751 Merge pull request #685 from lilic/bump-prom-operator
Bump to prometheus-operator 0.42.1 and update all deps
2020-09-23 10:34:17 +02:00
Lili Cosic
c409837c16 manifests: Regenerate files 2020-09-22 17:59:06 +02:00
Lili Cosic
e699efff3f jsonnetfile.lock.json: jb update 2020-09-22 17:27:23 +02:00
Paweł Krupa
63f4577de7 Merge pull request #683 from dgrisonnet/migrate-ci-to-actions
Migrate CI to github actions
2020-09-22 08:15:23 +02:00
Damien Grisonnet
6eb8c9d123 ci: migrate to github actions
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2020-09-21 10:36:59 +02:00
Frederic Branczyk
f321bc49c8 Merge pull request #671 from paulfantom/tests
tests: allow easy test paralelization
2020-09-21 10:34:41 +02:00
Frederic Branczyk
e85046ad6f Merge pull request #677 from paulfantom/mixin
Use prometheus-operator mixin
2020-09-21 10:14:22 +02:00
Matthias Loibl
59d6843d3d Merge pull request #682 from paulfantom/follow-up-675
Fixing issues with kube-rbac-proxy when importing kube-prometheus as a library
2020-09-18 16:35:05 +02:00
paulfantom
d5e3c294d8 tests: allow easy test paralelization 2020-09-18 15:55:58 +02:00
paulfantom
ea109b463d jsonnet/kube-prometheus/kube-state-metrics: fix indentation 2020-09-18 15:49:46 +02:00
paulfantom
bb4b7019a7 jsonnet: do not relative jb import paths and move imports to the top of the file 2020-09-18 15:46:22 +02:00
paulfantom
358c4e75f1 manifests: regenerate 2020-09-18 10:37:01 +02:00
paulfantom
e8cc596699 jsonnet/kube-prometheus: use prometheus-operator mixin 2020-09-18 10:36:57 +02:00
Frederic Branczyk
5fe45c57b6 Merge pull request #675 from metalmatze/absolute-imports
Use absolut jsonnet imports whenever possible
2020-09-14 07:31:10 +02:00
Matthias Loibl
e6111e58c4 Fix node-mixin import 2020-09-11 18:09:05 +02:00
Matthias Loibl
09293866ae Use absolut jsonnet imports whenever possible
There are still some dependencies that we need to make work to fully
deactivate the legacyImports in the future. I'll start opening PRs
against those other repositories.
2020-09-11 18:06:43 +02:00
Lili Cosic
2212ee3db6 Merge pull request #674 from metalmatze/update-deps-promop
Update dependencies and most importantly Prometheus Operator to v0.42.0
2020-09-11 13:53:55 +02:00
Matthias Loibl
2d3c10e3f7 Update dependencies and most importantly PromOp to v0.42.0 2020-09-11 13:14:22 +02:00
Frederic Branczyk
e55b6a8272 Merge pull request #673 from dgrisonnet/bump-kube-rbac-proxy
Bump kube rbac proxy to v0.6.0
2020-09-10 16:31:51 +02:00
Damien Grisonnet
152c02b7f8 manifests: regenerate
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2020-09-10 16:15:53 +02:00
Damien Grisonnet
9e18cf2097 jsonnet: bump kube-rbac-proxy to v0.6.0
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2020-09-10 16:15:35 +02:00
Frederic Branczyk
a6e6853f62 Merge pull request #668 from lilic/bump-1.19
Bump to kubernetes 1.19.0
2020-09-10 09:27:51 +02:00
Lili Cosic
b8b92a002f Bump to kubernetes 1.19.0 2020-09-09 17:47:34 +02:00
Frederic Branczyk
911543d0ee Merge pull request #658 from andres-de-castro/argocd-examples
Argocd examples
2020-09-04 16:29:34 +02:00
Andres De Castro
4cef8bb7d9 Update argocd-basic.jsonnet
Removed EKS patch from example
2020-09-04 09:25:36 -04:00
Frederic Branczyk
44060e5f19 Merge pull request #661 from sdodson/node-exporter-max-unavailable
node-exporter: set maxUnavailable to 10%
2020-09-02 12:28:51 +02:00
Scott Dodson
ddc853e1ac node-exporter: set maxUnavailable to 10%
This daemonset doesn't affect workload availability so allow its rollout to
be parallelized.
2020-09-01 15:08:45 -04:00
Paweł Krupa
88fe47b35e Merge pull request #652 from PerfectMemory/fix-probe-with-ingress-650 2020-08-31 15:09:10 +02:00
Sergiusz Urbaniak
dc82316d0a Merge pull request #657 from qedsoftware/alertmanager-config-plain
Support utf8 in external file alertmanager config
2020-08-31 10:48:47 +02:00
Andres De Castro
d869da16fc added entry in README.md 2020-08-28 11:39:27 -04:00
Andres De Castro
1e0ad975c1 added argocd exmaples 2020-08-28 11:35:40 -04:00
Michał Łazowik
28b717a984 Support utf8 in external file alertmanager config
This could have been achieved either by switching to stringData, or doing
`std.base64(std.encodeUTF8($._config.alertmanager.config))` as per
google/jsonnet#575

I went with the former, because it's:
1. Easier to read existing config
2. Consistent with the way jsonnet object-based config is written just above
2020-08-28 01:57:50 +02:00
Julien Pervillé
4e458eeb2a Allow prometheus to get/list/watch extensions.ingresses 2020-08-20 10:58:26 +02:00
Julien Pervillé
d9d4eebd96 Add missing probeSelector: {} and probeNamespaceSelector: {} in manifests 2020-08-19 09:48:04 +02:00
Lucas Servén Marín
4f872f1e31 Merge pull request #645 from DeanBrunt/patch-1
Grammatical correction in README
2020-08-13 11:59:50 +02:00
Dean Brunt
93e692427f Grammatical correction in README 2020-08-13 10:49:56 +01:00
Frederic Branczyk
8a8595b5f3 Merge pull request #628 from lilic/unpin-jb
Pin back to master and bump prometheus-operator to 0.41.1
2020-08-12 15:04:47 +02:00
Lili Cosic
cce58b9514 manifests: Regenerate 2020-08-12 13:09:12 +02:00
Lili Cosic
be50fc2453 jsonnetfile.lock.json: Update 2020-08-12 13:09:05 +02:00
Frederic Branczyk
f108af7fda Merge pull request #638 from KingJ/sidecar-servicemonitor
Thanos Sidecar Exposure and Scraping via ServiceMonitor
2020-08-11 09:31:05 +02:00
KingJ
c62b9569d9 Thanos Sidecar Exposure and Scraping
Expose the Thanos Sidecar's HTTP metrics and gRPC StoreAPI interfaces via a dedicated service. ClusterIP is set to none to allow for full discovery of all endpoints behind the service via in-cluster DNS. This allows for a new ServiceMonitor to then scrape the metrics available on the Sidecar's HTTP port.

A new service has been used so as to separate out the metrics that Prometheus makes available, and the metrics the Thanos Sidecar makes available. The Thanos Mixins from thanos-io/thanos default to a job label of 'thanos-sidecar', and hence the service here has had this label applied.
2020-08-09 17:11:46 +01:00
Frederic Branczyk
0edb796d57 Merge pull request #634 from lilic/adjust-prom-operator-alerts
jsonnet/prometheus-operator.libsonnet: Adjust alerts range
2020-08-06 13:49:48 +02:00
Lili Cosic
16778e0f9f manifests/prometheus-rules.yaml: Regenerate 2020-08-06 10:57:41 +02:00
Lili Cosic
5417071d15 jsonnet/prometheus-operator.libsonnet: Adjust alerts range 2020-08-06 10:56:11 +02:00
Lili Cosic
9cc4430369 manifests: Regenerate 2020-08-06 10:04:25 +02:00
Lili Cosic
6c47a6e898 jsonnet/kube-prometheus/kube-state-metrics: Bump version 2020-08-06 10:04:25 +02:00
Lili Cosic
490580dde7 kustomization.yaml, manifests/*: Regenerate files 2020-08-06 10:04:25 +02:00
Lili Cosic
e254781636 jsonnet/kube-prometheus/jsonnetfile.json: Pin to master 2020-08-06 10:04:24 +02:00
Lili Cosic
d4f8ffcd03 go.sum,mod: Bump jb to latest release 2020-08-06 10:03:57 +02:00
Paweł Krupa
055d378db3 Merge pull request #630 from paulfantom/migration 2020-08-05 16:04:16 +02:00
paulfantom
87fcf52469 Adjust links after repository migration 2020-08-05 15:50:40 +02:00
361 changed files with 98421 additions and 52561 deletions

1
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1 @@
* @prometheus-operator/kube-prometheus-reviewers

View File

@@ -5,7 +5,7 @@ labels: kind/support
---
This repository now has the new GitHub Discussions enabled:
https://github.com/coreos/kube-prometheus/discussions
https://github.com/prometheus-operator/kube-prometheus/discussions
Please create a new discussion to ask for any kind of support, which is not a Bug or Feature Request.

37
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,37 @@
<!--
WARNING: Not using this template will result in a longer review process and your change won't be visible in CHANGELOG.
-->
## Description
_Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
If it fixes a bug or resolves a feature request, be sure to link to that issue._
## Type of change
_What type of changes does your code introduce to the kube-prometheus? Put an `x` in the box that apply._
- [ ] `CHANGE` (fix or feature that would cause existing functionality to not work as expected)
- [ ] `FEATURE` (non-breaking change which adds functionality)
- [ ] `BUGFIX` (non-breaking change which fixes an issue)
- [ ] `ENHANCEMENT` (non-breaking change which improves existing functionality)
- [ ] `NONE` (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)
## Changelog entry
_Please put a one-line changelog entry below. Later this will be copied to the changelog file._
<!--
Your release note should be written in clear and straightforward sentences. Most often, users aren't familiar with
the technical details of your PR, so consider what they need to know when you write your release note.
Some brief examples of release notes:
- Add metadataConfig field to the Prometheus CRD for configuring how remote-write sends metadata information.
- Generate correct scraping configuration for Probes with empty or unset module parameter.
-->
```release-note
```

16
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: gomod
directory: /
schedule:
interval: daily
- package-ecosystem: gomod
directory: /scripts/
schedule:
interval: daily
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily

132
.github/workflows/ci.yaml vendored Normal file
View File

@@ -0,0 +1,132 @@
name: ci
on:
- push
- pull_request
env:
golang-version: '1.22'
kind-version: 'v0.24.0'
jobs:
generate:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
name: Generate
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-go@v5
with:
go-version: ${{ env.golang-version }}
- run: make --always-make generate validate && git diff --exit-code
check-docs:
runs-on: ubuntu-latest
name: Check Documentation formatting and links
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-go@v5
with:
go-version: ${{ env.golang-version }}
- run: make check-docs
lint:
runs-on: ubuntu-latest
name: Jsonnet linter
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-go@v5
with:
go-version: ${{ env.golang-version }}
- run: make --always-make lint
fmt:
runs-on: ubuntu-latest
name: Jsonnet formatter
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-go@v5
with:
go-version: ${{ env.golang-version }}
- run: make --always-make fmt && git diff --exit-code
unit-tests:
runs-on: ubuntu-latest
name: Unit tests
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-go@v5
with:
go-version: ${{ env.golang-version }}
- run: make --always-make test
security-audit:
runs-on: ubuntu-latest
name: Run security analysis on manifests
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-go@v5
with:
go-version: ${{ env.golang-version }}
- run: make --always-make kubescape
e2e-tests:
name: E2E tests
runs-on: ubuntu-latest
strategy:
matrix:
kind-image:
- 'kindest/node:v1.31.0'
- 'kindest/node:v1.30.4'
- 'kindest/node:v1.29.8'
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-go@v5
with:
go-version: ${{ env.golang-version }}
- name: Start kind cluster
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.kind-version }}
node_image: ${{ matrix.kind-image }}
wait: 10s # Without default CNI, control-plane doesn't get ready until Cilium is installed
config: .github/workflows/kind/config.yml
cluster_name: e2e
- name: Install kube-router for NetworkPolicy support
run: |
kubectl apply -f .github/workflows/kind/kube-router.yaml
- name: Wait for cluster to finish bootstraping
run: kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=300s
- name: Create kube-prometheus stack
run: |
kubectl create -f manifests/setup
until kubectl get servicemonitors --all-namespaces ; do date; sleep 1; echo ""; done
kubectl create -f manifests/
- name: Run tests
run: |
export KUBECONFIG="${HOME}/.kube/config"
make test-e2e
# Added to summarize the matrix and allow easy branch protection rules setup
e2e-tests-result:
name: End-to-End Test Results
if: always()
needs:
- e2e-tests
runs-on: ubuntu-latest
steps:
- name: Mark the job as a success
if: needs.e2e-tests.result == 'success'
run: exit 0
- name: Mark the job as a failure
if: needs.e2e-tests.result != 'success'
run: exit 1

15
.github/workflows/kind/config.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
podSubnet: "10.10.0.0/16"
serviceSubnet: "10.11.0.0/16"
nodes:
- role: control-plane
extraMounts:
- hostPath: /home/runner/work/kube-prometheus/kube-prometheus/.github/workflows/kind/patches
containerPath: /patches
kubeadmConfigPatches:
- |
kind: InitConfiguration
patches:
directory: /patches

186
.github/workflows/kind/kube-router.yaml vendored Normal file
View File

@@ -0,0 +1,186 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: kube-router-cfg
namespace: kube-system
labels:
tier: node
k8s-app: kube-router
data:
cni-conf.json: |
{
"cniVersion":"0.3.0",
"name":"mynet",
"plugins":[
{
"name":"kubernetes",
"type":"bridge",
"bridge":"kube-bridge",
"isDefaultGateway":true,
"ipam":{
"type":"host-local"
}
}
]
}
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
k8s-app: kube-router
tier: node
name: kube-router
namespace: kube-system
spec:
selector:
matchLabels:
k8s-app: kube-router
tier: node
template:
metadata:
labels:
k8s-app: kube-router
tier: node
spec:
priorityClassName: system-node-critical
serviceAccountName: kube-router
containers:
- name: kube-router
image: docker.io/cloudnativelabs/kube-router
imagePullPolicy: Always
args:
- --run-router=true
- --run-firewall=true
- --run-service-proxy=false
- --bgp-graceful-restart=true
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: KUBE_ROUTER_CNI_CONF_FILE
value: /etc/cni/net.d/10-kuberouter.conflist
livenessProbe:
httpGet:
path: /healthz
port: 20244
initialDelaySeconds: 10
periodSeconds: 3
resources:
requests:
memory: 250Mi
securityContext:
privileged: true
volumeMounts:
- name: lib-modules
mountPath: /lib/modules
readOnly: true
- name: cni-conf-dir
mountPath: /etc/cni/net.d
- name: kubeconfig
mountPath: /var/lib/kube-router/kubeconfig
readOnly: true
- name: xtables-lock
mountPath: /run/xtables.lock
readOnly: false
initContainers:
- name: install-cni
image: docker.io/cloudnativelabs/kube-router
imagePullPolicy: Always
command:
- /bin/sh
- -c
- set -e -x;
if [ ! -f /etc/cni/net.d/10-kuberouter.conflist ]; then
if [ -f /etc/cni/net.d/*.conf ]; then
rm -f /etc/cni/net.d/*.conf;
fi;
TMP=/etc/cni/net.d/.tmp-kuberouter-cfg;
cp /etc/kube-router/cni-conf.json ${TMP};
mv ${TMP} /etc/cni/net.d/10-kuberouter.conflist;
fi
volumeMounts:
- mountPath: /etc/cni/net.d
name: cni-conf-dir
- mountPath: /etc/kube-router
name: kube-router-cfg
hostNetwork: true
tolerations:
- effect: NoSchedule
operator: Exists
- key: CriticalAddonsOnly
operator: Exists
- effect: NoExecute
operator: Exists
volumes:
- name: lib-modules
hostPath:
path: /lib/modules
- name: cni-conf-dir
hostPath:
path: /etc/cni/net.d
- name: kube-router-cfg
configMap:
name: kube-router-cfg
- name: kubeconfig
hostPath:
path: /var/lib/kube-router/kubeconfig
- name: xtables-lock
hostPath:
path: /run/xtables.lock
type: FileOrCreate
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kube-router
namespace: kube-system
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kube-router
namespace: kube-system
rules:
- apiGroups:
- ""
resources:
- namespaces
- pods
- services
- nodes
- endpoints
verbs:
- list
- get
- watch
- apiGroups:
- "networking.k8s.io"
resources:
- networkpolicies
verbs:
- list
- get
- watch
- apiGroups:
- extensions
resources:
- networkpolicies
verbs:
- get
- list
- watch
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kube-router
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kube-router
subjects:
- kind: ServiceAccount
name: kube-router
namespace: kube-system

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: kube-controller-manager
namespace: kube-system
spec:
containers:
- name: kube-controller-manager
resources:
requests:
cpu: 1m

21
.github/workflows/stale.yaml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 3 * * *'
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue has been automatically marked as stale because it has not had any activity in the last 60 days. Thank you for your contributions.'
close-issue-message: 'This issue was closed because it has not had any activity in the last 120 days. Please reopen if you feel this is still valid.'
days-before-stale: 60
days-before-issue-close: 120
days-before-pr-close: -1 # Prevent closing PRs
exempt-issue-labels: 'kind/feature,help wanted,kind/bug'
stale-issue-label: 'stale'
stale-pr-label: 'stale'
exempt-draft-pr: true
operations-per-run: 500

86
.github/workflows/versions.yaml vendored Normal file
View File

@@ -0,0 +1,86 @@
name: Upgrade to latest versions
on:
workflow_dispatch:
schedule:
- cron: '37 7 * * 1'
env:
golang-version: '1.22'
jobs:
versions:
runs-on: ubuntu-latest
strategy:
matrix:
branch:
- 'release-0.11'
- 'release-0.12'
- 'release-0.13'
- 'main'
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
- uses: actions/setup-go@v5
with:
go-version: ${{ env.golang-version }}
- name: Upgrade versions
id: versions
run: |
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
# Write to temporary file to make update atomic
scripts/generate-versions.sh > /tmp/versions.json
mv /tmp/versions.json jsonnet/kube-prometheus/versions.json
# Display the raw diff between versions.
git diff
# Get the links to the changelogs of the updated versions and make them
# available to the reviewers
{
echo 'new_changelogs<<EOF'
echo $(scripts/get-new-changelogs.sh)
echo EOF
} >> $GITHUB_OUTPUT
if: matrix.branch == 'main'
- name: Update jsonnet dependencies
run: |
make update
make generate
# Reset jsonnetfile.lock.json if no dependencies were updated
changedFiles=$(git diff --name-only | grep -v 'jsonnetfile.lock.json' | wc -l)
if [[ "$changedFiles" -eq 0 ]]; then
git checkout -- jsonnetfile.lock.json;
fi
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
commit-message: "[bot] [${{ matrix.branch }}] Automated version update"
title: "[bot] [${{ matrix.branch }}] Automated version update"
body: |
## Description
This is an automated version and jsonnet dependencies update performed from CI.
Please review the following changelogs to make sure that we don't miss any important
changes before merging this PR.
${{ steps.versions.outputs.new_changelogs }}
Configuration of the workflow is located in `.github/workflows/versions.yaml`.
## Type of change
- [x] `NONE` (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)
## Changelog entry
```release-note
```
team-reviewers: kube-prometheus-reviewers
committer: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
author: Prometheus Operator Bot <prom-op-bot@users.noreply.github.com>
branch: automated-updates-${{ matrix.branch }}
delete-branch: true
# GITHUB_TOKEN cannot be used as it won't trigger CI in a created PR
# More in https://github.com/peter-evans/create-pull-request/issues/155
token: ${{ secrets.PROM_OP_BOT_PAT }}

5
.gitignore vendored
View File

@@ -3,3 +3,8 @@ minikube-manifests/
vendor/
./auth
.swp
crdschemas/
.mdoxcache
developer-workspace/gitpod/_output
developer-workspace/codespaces/kind

47
.gitpod.yml Normal file
View File

@@ -0,0 +1,47 @@
image: gitpod/workspace-full
checkoutLocation: gitpod-k3s
tasks:
- init: |
make --always-make
export PATH="$(pwd)/tmp/bin:${PATH}"
cat > ${PWD}/.git/hooks/pre-commit <<EOF
#!/bin/bash
echo "Checking jsonnet fmt"
make fmt > /dev/null 2>&1
echo "Checking if manifests are correct"
make generate > /dev/null 2>&1
git diff --exit-code
if [[ \$? == 1 ]]; then
echo "
This commit is being rejected because the YAML manifests are incorrect or jsonnet needs to be formatted."
echo "Please commit your changes again!"
exit 1
fi
EOF
chmod +x ${PWD}/.git/hooks/pre-commit
- name: run kube-prometheus
command: |
developer-workspace/gitpod/prepare-k3s.sh
developer-workspace/common/deploy-kube-prometheus.sh
- name: kernel dev environment
init: |
sudo apt update -y
sudo apt install qemu qemu-system-x86 linux-image-$(uname -r) libguestfs-tools sshpass netcat -y
sudo curl -o /usr/bin/kubectl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo chmod +x /usr/bin/kubectl
developer-workspace/gitpod/prepare-rootfs.sh
command: |
developer-workspace/gitpod/qemu.sh
ports:
- port: 3000
onOpen: open-browser
- port: 9090
onOpen: open-browser
- port: 9093
onOpen: open-browser
vscode:
extensions:
- heptio.jsonnet

16
.mdox.validate.yaml Normal file
View File

@@ -0,0 +1,16 @@
version: 1
validators:
# Ignore localhost links.
- regex: 'localhost'
type: "ignore"
# Ignore release links.
- regex: 'https:\/\/github\.com\/prometheus-operator\/kube-prometheus\/releases'
type: "ignore"
# Twitter changed their policy and now returns 403 if not authenticated. We can guarantee this link since we own the account.
- regex: 'https:\/\/twitter.com\/PromOperator'
type: "ignore"
# the www.weave.works domain returns 404 for many pages.
# Ignoring for now but we need remove the related content if it persists.
- regex: 'https:\/\/www.weave.works.*'
type: "ignore"

View File

@@ -1,21 +0,0 @@
sudo: required
dist: xenial
language: go
go:
- "1.13.x"
go_import_path: github.com/coreos/kube-prometheus
cache:
directories:
- $GOCACHE
- $GOPATH/pkg/mod
jobs:
include:
- name: Check generated files
script: make --always-make generate && git diff --exit-code
- name: Run tests
script: make --always-make test
- name: Run e2e tests
script: ./tests/e2e/travis-e2e.sh

149
CHANGELOG.md Normal file
View File

@@ -0,0 +1,149 @@
## release-0.14 / 2024-09-12
* [CHANGE] Prefer new form for `kube_node_status_capacity_pods` metric [#2269](https://github.com/prometheus-operator/kube-prometheus/pull/2269)
* [CHANGE] Add runAsGroup to all components [#2424](https://github.com/prometheus-operator/kube-prometheus/pull/2424)
* [FEATURE] Add support for ScrapeConfig [#2232](https://github.com/prometheus-operator/kube-prometheus/pull/2232)
* [FEATURE] Add Kubernetes components SLI metrics [#2496](https://github.com/prometheus-operator/kube-prometheus/pull/2496)
* [FEATURE] Add monitor and rules resources to user-facing roles add-on [#2238](https://github.com/prometheus-operator/kube-prometheus/pull/2238)
* [BUGFIX] Add thanos-sidecar metrics port to Prometheus Service and NetworkPolicy [#2330](https://github.com/prometheus-operator/kube-prometheus/pull/2330)
* [ENHANCEMENT] Add ability to inject Secrets into alertmanager [#2206](https://github.com/prometheus-operator/kube-prometheus/pull/2206)
* [ENHANCEMENT] Add securityContext items and Pod security labels [#2178](https://github.com/prometheus-operator/kube-prometheus/pull/2178)
## release-0.13 / 2023-08-31
* [CHANGE] Added a AKS platform to `platforms.libsonnet` [#1997](https://github.com/prometheus-operator/kube-prometheus/pull/1997)
* [CHANGE] Disable btrfs collector by default [#2074](https://github.com/prometheus-operator/kube-prometheus/pull/2074)
* [CHANGE] Enable Multi Cluster alerts by default [#2099](https://github.com/prometheus-operator/kube-prometheus/pull/2099)
* [FEATURE] Create dedicated Service to expose CoreDNS metric [#2107](https://github.com/prometheus-operator/kube-prometheus/pull/2107)
* [FEATURE] Add Windows support using Hostprocess instead of static_configs [#2048](https://github.com/prometheus-operator/kube-prometheus/pull/2048)
* [BUGFIX] Fix a compilation error when building the custom-metrics addon [#1996](https://github.com/prometheus-operator/kube-prometheus/pull/1996)
* [BUGFIX] Add `prometheus-adapter` in Prometheus's NetworkPolicy [#1982](https://github.com/prometheus-operator/kube-prometheus/pull/1982)
* [BUGFIX] Fix namespace specified in manifest non-namespaced resources [#2158](https://github.com/prometheus-operator/kube-prometheus/pull/2158)
* [BUGFIX] Override ServiceAccount, Role and ClusterRole names in RoleBinding and ClusterRoleBinding [#2135](https://github.com/prometheus-operator/kube-prometheus/pull/2135)
* [BUGFIX] Remove deprecated `--logtostderr` argument of prometheus-adapter [#2185](https://github.com/prometheus-operator/kube-prometheus/pull/2185)
* [BUGFIX] Fix alertmanager external config example [#1891](https://github.com/prometheus-operator/kube-prometheus/pull/1891)
* [ENHANCEMENT] Add startupProbe to prometheus-adapter [#2029](https://github.com/prometheus-operator/kube-prometheus/pull/2029)
* [ENHANCEMENT] Added configurable default values for kube-rbac-proxy in prometheus-operator, node-exporter and blackbox-exporter [#1987](https://github.com/prometheus-operator/kube-prometheus/pull/1987)
* [ENHANCEMENT] Modify control plane ServiceMonitors to be compatible with Argo [#2041](https://github.com/prometheus-operator/kube-prometheus/pull/2041)
* [ENHANCEMENT] Add md5 hash of the ConfigMap in Prometheus Adapter Deployment Annotations to force its recreation [#2195](https://github.com/prometheus-operator/kube-prometheus/pull/2195)
## release-0.12 / 2023-01-19
* [CHANGE] Updates Prometheus Adapater version to 0.10.0 [#1865](https://github.com/prometheus-operator/kube-prometheus/pull/1865)
* [FEATURE] Added a AKS platform [#1869](https://github.com/prometheus-operator/kube-prometheus/pull/1869)
* [BUGFIX] Update Pyrra to 0.4.2 [#1800](https://github.com/prometheus-operator/kube-prometheus/pull/1800)
* [BUGFIX] Jsonnet: enable automountServiceAccountToken for prometheus service account [#1808](https://github.com/prometheus-operator/kube-prometheus/pull/1808)
* [BUGFIX] Fix diskDeviceSelector regex for aks and eks [#1810](https://github.com/prometheus-operator/kube-prometheus/pull/1810)
* [BUGFIX] Set path.udev.data Argument of Node Exporter [#1913](https://github.com/prometheus-operator/kube-prometheus/pull/1913)
* [BUGFIX] Include RAID device md.* in disk seletor [#1945](https://github.com/prometheus-operator/kube-prometheus/pull/1945)
* [ENHANCEMENT] Prometheus-adapter: add prefix option to config for container metrics [#1844](https://github.com/prometheus-operator/kube-prometheus/pull/1844)
* [ENHANCEMENT] Switch kube-state-metrics registry to registry.k8s.io [#1914](https://github.com/prometheus-operator/kube-prometheus/pull/1914)
* [ENHANCEMENT] Node Exporter: add parameter for ignored network devices [#1887](https://github.com/prometheus-operator/kube-prometheus/pull/1887)
## release-0.11 / 2022-06-15
* [CHANGE] Disable injecting unnecessary variables allowing access to k8s API [#1591](https://github.com/prometheus-operator/kube-prometheus/pull/1591)
* [FEATURE] Add grafana-mixin [#1458](https://github.com/prometheus-operator/kube-prometheus/pull/1458)
* [FEATURE] Add example usage of prometheus-agent [#1472](https://github.com/prometheus-operator/kube-prometheus/pull/1472)
* [FEATURE] Add Pyrra as (optional) component [#1667](https://github.com/prometheus-operator/kube-prometheus/pull/1667)
* [ENHANCEMENT] Adds NetworkPolicies to all components of Kube-prometheus [#1650](https://github.com/prometheus-operator/kube-prometheus/pull/1650)
* [ENHANCEMENT] Scan generated manifests with kubescape in CI [#1584](https://github.com/prometheus-operator/kube-prometheus/pull/1584)
* [ENHANCEMENT] Explicitly declare allowPrivilegeEscalation to false in all components [#1593](https://github.com/prometheus-operator/kube-prometheus/pull/1593)
* [ENHANCEMENT] Forbid write access to root filesystem [#1600](https://github.com/prometheus-operator/kube-prometheus/pull/1600)
* [ENHANCEMENT] Drop Linux capabilities, , just keeping CAP_SYS_TIME for node-exporter [#1610](https://github.com/prometheus-operator/kube-prometheus/pull/1610)
* [ENHANCEMENT] Remove hostPort from node-export daemonset [#1612](https://github.com/prometheus-operator/kube-prometheus/pull/1612)
* [ENHANCEMENT] Add priorityClassName as system-cluster-critical for node_exporter [#1649](https://github.com/prometheus-operator/kube-prometheus/pull/1649)
* [ENHANCEMENT] Added custom overrides for kube-rbac-proxy-self [#1637](https://github.com/prometheus-operator/kube-prometheus/pull/1637)
* [ENHANCEMENT] Adds readinessProbe and livenessProbe to prometheus-adapter jsonnet [#1696](https://github.com/prometheus-operator/kube-prometheus/pull/1696)
* [BUGFIX] Update kubeadm integration of kube-prometheus [#1569](https://github.com/prometheus-operator/kube-prometheus/pull/1569)
* [BUGFIX] Add projected volumes permission to addon/podsecuritypolicie [#1572](https://github.com/prometheus-operator/kube-prometheus/pull/1572)
* [BUGFIX] Hide namespace for prometheus clusterRole and clusterRolebinding [#1566](https://github.com/prometheus-operator/kube-prometheus/pull/1566)
* [BUGFIX] Fix accidentally broken thanosSelector after #1543 [#1556](https://github.com/prometheus-operator/kube-prometheus/pull/1556)
* [BUGFIX] Jsonnet: filter out kube-proxy alerts when kube-proxy is disabled [#1609](https://github.com/prometheus-operator/kube-prometheus/pull/1609)
* [BUGFIX] Sanitize regex denylist in ksm-lite addon [#1613](https://github.com/prometheus-operator/kube-prometheus/pull/1613)
* [BUGFIX] Sanitize all regex denylist in ksm-lite addon [#1614](https://github.com/prometheus-operator/kube-prometheus/pull/1614)
* [BUGFIX] Add extra-volume mount for plugins downloads [#1624](https://github.com/prometheus-operator/kube-prometheus/pull/1624)
* [BUGFIX] Added allowedCapabilities to node-exporter psp [#1642](https://github.com/prometheus-operator/kube-prometheus/pull/1642)
* [BUGFIX] Fix cluster:node_cpu:ratio query [#1628](https://github.com/prometheus-operator/kube-prometheus/pull/1628)
* [BUGFIX] Removed CAP_ from node-exporter daemonset [#1647](https://github.com/prometheus-operator/kube-prometheus/pull/1647)
* [BUGFIX] Update PodMonitor for kube-proxy [#1630](https://github.com/prometheus-operator/kube-prometheus/pull/1630)
* [BUGFIX] Adds port name to prometheus-adapter [#1701](https://github.com/prometheus-operator/kube-prometheus/pull/1701)
* [BUGFIX] Fix grafana network access [#1721](https://github.com/prometheus-operator/kube-prometheus/pull/1721)
* [BUGFIX] Fix networkpolicies-disabled addon [#1724](https://github.com/prometheus-operator/kube-prometheus/pull/1724)
* [BUGFIX] Adjust NodeFilesystemSpaceFillingUp thresholds according default kubelet GC behavior [#1729](https://github.com/prometheus-operator/kube-prometheus/pull/1729)
* [BUGFIX] Fix problems when enabling eks platform patch [#1675](https://github.com/prometheus-operator/kube-prometheus/pull/1675)
* [BUGFIX] Access requests to sidecar from thanos-query [#1730](https://github.com/prometheus-operator/kube-prometheus/pull/1730)
* [BUGFIX] Fix prometheus namespace connection for addons/pyrra [#1734](https://github.com/prometheus-operator/kube-prometheus/pull/1734)
## release-0.10 / 2021-12-17
* [CHANGE] Adjust node filesystem space filling up warning threshold to 20% [#1357](https://github.com/prometheus-operator/kube-prometheus/pull/1357)
* [CHANGE] Always generate grafana-config secret [#1373](https://github.com/prometheus-operator/kube-prometheus/pull/1373)
* [CHANGE] Make filesystem ignored mount points configurable for node-exporter [#1376](https://github.com/prometheus-operator/kube-prometheus/pull/1376)
* [CHANGE] Drop some high cardinality cAdvisor metrics [#1406](https://github.com/prometheus-operator/kube-prometheus/pull/1406), [#1396](https://github.com/prometheus-operator/kube-prometheus/pull/1396)
* [CHANGE] Use `--collector.filesystem.mount-points-exclude` instead of deprecated `--collector.filesystem.ignored-mount-points` argument for `node-exporter` [#1407](https://github.com/prometheus-operator/kube-prometheus/pull/1407)
* [CHANGE] Drop some of prometheus-adapter metrics that are inherited from the apiserver code but aren't useful in the context of prometheus-adapter [#1409](https://github.com/prometheus-operator/kube-prometheus/pull/1409)
* [CHANGE] Remove "app" label selector deprecated by Prometheus-operator [#1420](https://github.com/prometheus-operator/kube-prometheus/pull/1420)
* [CHANGE] Use recommended instance label for Prometheus/Alertmanager resources [#1520](https://github.com/prometheus-operator/kube-prometheus/pull/1520)
* [CHANGE] Drop deprecated apiserver_longrunning_gauge and apiserver_registered_watchers metrics [#1553](https://github.com/prometheus-operator/kube-prometheus/pull/1553)
* [CHANGE] Drop deprecated coredns_cache_misses_total [#1553](https://github.com/prometheus-operator/kube-prometheus/pull/1553)
* [ENHANCEMENT] Add support for LDAP authentication in Grafana [#1455](https://github.com/prometheus-operator/kube-prometheus/pull/1445)
* [ENHANCEMENT] Include rewritten kubernetes-grafana for easier usage of new library features [#1450](https://github.com/prometheus-operator/kube-prometheus/pull/1450)
* [ENHANCEMENT] Specify default container in node-exporter pod [#1462](https://github.com/prometheus-operator/kube-prometheus/pull/1462)
* [ENHANCEMENT] Make metadata consistent across objects in the same component [#1471](https://github.com/prometheus-operator/kube-prometheus/pull/1471)
* [ENHANCEMENT] Establish convention for default field types [#1475](https://github.com/prometheus-operator/kube-prometheus/pull/1475)
* [ENHANCEMENT] Exclude k3s containerd mountpoints [#1497](https://github.com/prometheus-operator/kube-prometheus/pull/1497)
* [ENHANCEMENT] Alertmanager now uses the new `matcher` syntax in the routing tree and inhibition rules [#1508](https://github.com/prometheus-operator/kube-prometheus/pull/1508)
* [ENHANCEMENT] Deprecate `thanosSelector` and expose `mixin._config.thanos` config variable for thanos sidecar [#1543](https://github.com/prometheus-operator/kube-prometheus/pull/1543)
* [ENHANCEMENT] Added configurable default values for sidecar container kube-rbac-proxy-self in deployment kube-statate-metrics. [#1637](https://github.com/prometheus-operator/kube-prometheus/pull/1637)
* [FEATURE] Support scraping config-reloader sidecar for Prometheus and AlertManager StatefulSets [#1344](https://github.com/prometheus-operator/kube-prometheus/pull/1344)
* [FEATURE] Expose prometheus alerting configuration in $.values.prometheus configuration [#1476](https://github.com/prometheus-operator/kube-prometheus/pull/1476)
* [BUGFIX] Remove deprecated policy/v1beta1 Kubernetes API [#1433](https://github.com/prometheus-operator/kube-prometheus/pull/1433)
* [BUGFIX] Fix prometheus URL in prometheus-adapter [#1463](https://github.com/prometheus-operator/kube-prometheus/pull/1463)
* [BUGFIX] Always use proper values scope for namespace in addons [#1518](https://github.com/prometheus-operator/kube-prometheus/pull/1518)
* [BUGFIX] Fix default empty groups for k8s PrometheusRule [#1534](https://github.com/prometheus-operator/kube-prometheus/pull/1534)
## release-0.9 / 2021-08-19
* [CHANGE] Test against Kubernetes 1.21 and 1,22. #1161 #1337
* [CHANGE] Drop cAdvisor metrics without (pod, namespace) label pairs. #1250
* [CHANGE] Excluded deprecated `etcd_object_counts` metric. #1337
* [FEATURE] Add PodDisruptionBudget to prometheus-adapter. #1136
* [FEATURE] Add support for feature flags in Prometheus. #1129
* [FEATURE] Add env parameter for grafana component. #1171
* [FEATURE] Add gitpod deployment of kube-prometheus on k3s. #1211
* [FEATURE] Add resource requests and limits to prometheus-adapter container. #1282
* [FEATURE] Add PodMonitor for kube-proxy. #1230
* [FEATURE] Turn AWS VPC CNI into a control plane add-on. #1307
* [ENHANCEMENT] Export anti-affinity addon. #1114
* [ENHANCEMENT] Allow changing configmap-reloader, grafana, and kube-rbac-proxy images in $.values.common.images. #1123 #1124 #1125
* [ENHANCEMENT] Add automated version upgrader. #1166
* [ENHANCEMENT] Improve all-namespace addon. #1131
* [ENHANCEMENT] Add example of running without grafana deployment. #1201
* [ENHANCEMENT] Import managed-cluster addon for the EKS platform. #1205
* [ENHANCEMENT] Automatically update jsonnet dependencies. #1220
* [ENHANCEMENT] Adapt kube-prometheus to changes to ovn veth interfaces names. #1224
* [ENHANCEMENT] Add example release-0.3 to release-0.8 migration to docs. #1235
* [ENHANCEMENT] Consolidate intervals used in prometheus-adapter CPU queries. #1231
* [ENHANCEMENT] Create dashboardDefinitions if rawDashboards or folderDashboards are specified. #1255
* [ENHANCEMENT] Relabel instance with node name for CNI DaemonSet on EKS. #1259
* [ENHANCEMENT] Update doc on Prometheus rule updates since release 0.8. #1253
* [ENHANCEMENT] Point runbooks to https://runbooks.prometheus-operator.dev. #1267
* [ENHANCEMENT] Allow setting of kubeRbacProxyMainResources in kube-state-metrics. #1257
* [ENHANCEMENT] Automate release branch updates. #1293 #1303
* [ENHANCEMENT] Create Thanos Sidecar rules separately from Prometheus ones. #1308
* [ENHANCEMENT] Allow using newer jsonnet-bundler dependency resolution when using windows addon. #1310
* [ENHANCEMENT] Prometheus ruleSelector defaults to all rules.
* [BUGFIX] Fix kube-state-metrics metric denylist regex pattern. #1146
* [BUGFIX] Fix missing resource config in blackbox exporter. #1148
* [BUGFIX] Fix adding private repository. #1169
* [BUGFIX] Fix kops selectors for scheduler, controllerManager and kube-dns. #1164
* [BUGFIX] Fix scheduler and controller selectors for Kubespray. #1142
* [BUGFIX] Fix label selector for coredns ServiceMonitor. #1200
* [BUGFIX] Fix name for blackbox-exporter PodSecurityPolicy. #1213
* [BUGFIX] Fix ingress path rules for networking.k8s.io/v1. #1212
* [BUGFIX] Disable insecure cypher suites for prometheus-adapter. #1216
* [BUGFIX] Fix CNI metrics relabelings on EKS. #1277
* [BUGFIX] Fix node-exporter ignore list for OVN. #1283
* [BUGFIX] Revert back to awscni_total_ip_addresses-based alert on EKS. #1292
* [BUGFIX] Allow passing `thanos: {}` to prometheus configuration. #1325

95
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,95 @@
# Contributing
This project is licensed under the [Apache 2.0 license](LICENSE) and accept
contributions via GitHub pull requests. This document outlines some of the
conventions on development workflow, commit message formatting, contact points
and other resources to make it easier to get your contribution accepted.
To maintain a safe and welcoming community, all participants must adhere to the
project's [Code of Conduct](code-of-conduct.md).
## Community
The project is developed in the open. Here are some of the channels we use to communicate and contribute:
[**Kubernetes Slack**](https://slack.k8s.io/): [#prometheus-operator](https://kubernetes.slack.com/archives/CFFDS2Z7F) -
General discussions channel
[**Kubernetes Slack**](https://slack.k8s.io/): [#prometheus-operator-dev](https://kubernetes.slack.com/archives/C01B03QCSMN) -
Channel used for project developers discussions
**Discussion forum**: [GitHub discussions](https://github.com/prometheus-operator/kube-prometheus/discussions)
**Twitter**: [@PromOperator](https://twitter.com/PromOperator)
**GitHub**: To file bugs and feature requests. For questions and discussions use the GitHub discussions. Generally,
the other community channels listed here are best suited to get support or discuss overarching topics.
Please avoid emailing maintainers directly.
We host publicy bi-weekly meetings focused on project development and contributions. Its meant for developers
and maintainers to meet and get unblocked, pair review, and discuss development aspects of this project and related
projects (e.g kubernetes-mixin). The document linked below contains all the details, including how to register.
**Office Hours**: [Prometheus Operator & Kube-prometheus Contributor Office Hours](https://docs.google.com/document/d/1-fjJmzrwRpKmSPHtXN5u6VZnn39M28KqyQGBEJsqUOk)
## Getting Started
- Fork the repository on GitHub
- Read the [README](README.md) for build and test instructions
- Play with the project, submit bug fixes, submit patches!
## Contribution Flow
This is a rough outline of what a contributor's workflow looks like:
- Create a topic branch from where you want to base your work (usually `main`).
- Make commits of logical units.
- Make sure your commit messages are in the proper format (see below).
- Push your changes to a topic branch in your fork of the repository.
- Make sure the tests pass, and add any new tests as appropriate.
- Submit a pull request to the original repository.
Thanks for your contributions!
### Generated Files
All `.yaml` files in the `/manifests` folder are generated via
[Jsonnet](https://jsonnet.org/). Contributing changes will most likely include
the following process:
1. Make your changes in the respective `*.jsonnet` or `*.libsonnet` file.
2. Commit your changes (This is currently necessary due to our vendoring
process. This is likely to change in the future).
3. Generate dependent `*.yaml` files: `make generate`
4. Commit the generated changes.
### Format of the Commit Message
We follow a rough convention for commit messages that is designed to answer two
questions: what changed and why. The subject line should feature the what and
the body of the commit should describe the why.
```
scripts: add the test-cluster command
this uses tmux to setup a test cluster that you can easily kill and
start for debugging.
Fixes #38
```
The format can be described more formally as follows:
```
<subsystem>: <what changed>
<BLANK LINE>
<why this change was made>
<BLANK LINE>
<footer>
```
The first line is the subject and should be no longer than 70 characters, the
second line is always blank, and other lines should be wrapped at 80 characters.
This allows the message to be easier to read on GitHub as well as in various
git tools.

36
DCO
View File

@@ -1,36 +0,0 @@
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
660 York Street, Suite 102,
San Francisco, CA 94110 USA
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

View File

@@ -1,47 +1,92 @@
SHELL=/bin/bash -o pipefail
export GO111MODULE=on
BIN_DIR?=$(shell pwd)/tmp/bin
EMBEDMD_BIN=$(BIN_DIR)/embedmd
MDOX_BIN=$(BIN_DIR)/mdox
JB_BIN=$(BIN_DIR)/jb
GOJSONTOYAML_BIN=$(BIN_DIR)/gojsontoyaml
JSONNET_BIN=$(BIN_DIR)/jsonnet
JSONNETLINT_BIN=$(BIN_DIR)/jsonnet-lint
JSONNETFMT_BIN=$(BIN_DIR)/jsonnetfmt
TOOLING=$(EMBEDMD_BIN) $(JB_BIN) $(GOJSONTOYAML_BIN) $(JSONNET_BIN) $(JSONNETFMT_BIN)
KUBECONFORM_BIN=$(BIN_DIR)/kubeconform
KUBESCAPE_BIN=$(BIN_DIR)/kubescape
TOOLING=$(JB_BIN) $(GOJSONTOYAML_BIN) $(JSONNET_BIN) $(JSONNETLINT_BIN) $(JSONNETFMT_BIN) $(KUBECONFORM_BIN) $(MDOX_BIN) $(KUBESCAPE_BIN)
JSONNETFMT_ARGS=-n 2 --max-blank-lines 2 --string-style s --comment-style s
all: generate fmt test
MDOX_VALIDATE_CONFIG?=.mdox.validate.yaml
MD_FILES_TO_FORMAT=$(shell find docs developer-workspace examples experimental jsonnet manifests -name "*.md") $(shell ls *.md)
KUBESCAPE_THRESHOLD=1
all: generate fmt test docs
.PHONY: clean
clean:
# Remove all files and directories ignored by git.
git clean -Xfd .
.PHONY: docs
docs: $(MDOX_BIN) $(shell find examples) build.sh example.jsonnet
@echo ">> formatting and local/remote links"
$(MDOX_BIN) fmt --soft-wraps -l --links.localize.address-regex="https://prometheus-operator.dev/.*" --links.validate.config-file=$(MDOX_VALIDATE_CONFIG) $(MD_FILES_TO_FORMAT)
.PHONY: check-docs
check-docs: $(MDOX_BIN) $(shell find examples) build.sh example.jsonnet
@echo ">> checking formatting and local/remote links"
$(MDOX_BIN) fmt --soft-wraps --check -l --links.localize.address-regex="https://prometheus-operator.dev/.*" --links.validate.config-file=$(MDOX_VALIDATE_CONFIG) $(MD_FILES_TO_FORMAT)
.PHONY: generate
generate: manifests **.md
generate: manifests
**.md: $(EMBEDMD_BIN) $(shell find examples) build.sh example.jsonnet
$(EMBEDMD_BIN) -w `find . -name "*.md" | grep -v vendor`
manifests: examples/kustomize.jsonnet $(GOJSONTOYAML_BIN) vendor build.sh
manifests: examples/kustomize.jsonnet $(GOJSONTOYAML_BIN) vendor
./build.sh $<
vendor: $(JB_BIN) jsonnetfile.json jsonnetfile.lock.json
rm -rf vendor
$(JB_BIN) install
crdschemas: vendor
./scripts/generate-schemas.sh
.PHONY: update
update: $(JB_BIN)
$(JB_BIN) update
.PHONY: validate
validate: validate-1.29 validate-1.30 validate-1.31
validate-1.29:
KUBE_VERSION=1.29.8 $(MAKE) kubeconform
validate-1.30:
KUBE_VERSION=1.30.4 $(MAKE) kubeconform
validate-1.31:
KUBE_VERSION=1.31.0 $(MAKE) kubeconform
.PHONY: kubeconform
kubeconform: crdschemas manifests $(KUBECONFORM_BIN)
$(KUBECONFORM_BIN) -kubernetes-version $(KUBE_VERSION) -schema-location 'default' -schema-location 'crdschemas/{{ .ResourceKind }}.json' -skip CustomResourceDefinition manifests/
.PHONY: kubescape
kubescape: $(KUBESCAPE_BIN) ## Runs a security analysis on generated manifests - failing if risk score is above threshold percentage 't'
$(KUBESCAPE_BIN) scan -s framework -t $(KUBESCAPE_THRESHOLD) nsa manifests/*.yaml --exceptions 'kubescape-exceptions.json'
.PHONY: fmt
fmt: $(JSONNETFMT_BIN)
find . -name 'vendor' -prune -o -name '*.libsonnet' -o -name '*.jsonnet' -print | \
find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
xargs -n 1 -- $(JSONNETFMT_BIN) $(JSONNETFMT_ARGS) -i
.PHONY: lint
lint: $(JSONNETLINT_BIN) vendor
find jsonnet/ -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
xargs -n 1 -- $(JSONNETLINT_BIN) -J vendor
.PHONY: test
test: $(JB_BIN)
$(JB_BIN) install
./test.sh
./scripts/test.sh
.PHONY: test-e2e
test-e2e:
@@ -52,4 +97,9 @@ $(BIN_DIR):
$(TOOLING): $(BIN_DIR)
@echo Installing tools from scripts/tools.go
@cat scripts/tools.go | grep _ | awk -F'"' '{print $$2}' | GOBIN=$(BIN_DIR) xargs -tI % go install %
@cd scripts && cat tools.go | grep _ | awk -F'"' '{print $$2}' | xargs -tI % go build -modfile=go.mod -o $(BIN_DIR) %
.PHONY: deploy
deploy:
./developer-workspace/codespaces/prepare-kind.sh
./developer-workspace/common/deploy-kube-prometheus.sh

5
NOTICE
View File

@@ -1,5 +0,0 @@
CoreOS Project
Copyright 2018 CoreOS, Inc
This product includes software developed at CoreOS, Inc.
(http://www.coreos.com/).

14
OWNERS
View File

@@ -1,14 +0,0 @@
reviewers:
- brancz
- metalmatze
- mxinden
- s-urbaniak
- squat
- paulfantom
approvers:
- brancz
- metalmatze
- mxinden
- s-urbaniak
- squat
- paulfantom

757
README.md
View File

@@ -1,5 +1,9 @@
# kube-prometheus
[![Build Status](https://github.com/prometheus-operator/kube-prometheus/workflows/ci/badge.svg)](https://github.com/prometheus-operator/kube-prometheus/actions)
[![Slack](https://img.shields.io/badge/join%20slack-%23prometheus--operator-brightgreen.svg)](http://slack.k8s.io/)
[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/prometheus-operator/kube-prometheus)
> Note that everything is experimental and may change significantly at any time.
This repository collects Kubernetes manifests, [Grafana](http://grafana.com/) dashboards, and [Prometheus rules](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/) combined with documentation and scripts to provide easy to operate end-to-end Kubernetes cluster monitoring with [Prometheus](https://prometheus.io/) using the Prometheus Operator.
@@ -8,75 +12,79 @@ The content of this project is written in [jsonnet](http://jsonnet.org/). This p
Components included in this package:
* The [Prometheus Operator](https://github.com/coreos/prometheus-operator)
* The [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator)
* Highly available [Prometheus](https://prometheus.io/)
* Highly available [Alertmanager](https://github.com/prometheus/alertmanager)
* [Prometheus node-exporter](https://github.com/prometheus/node_exporter)
* [Prometheus Adapter for Kubernetes Metrics APIs](https://github.com/DirectXMan12/k8s-prometheus-adapter)
* [Prometheus blackbox-exporter](https://github.com/prometheus/blackbox_exporter)
* [Prometheus Adapter for Kubernetes Metrics APIs](https://github.com/kubernetes-sigs/prometheus-adapter)
* [kube-state-metrics](https://github.com/kubernetes/kube-state-metrics)
* [Grafana](https://grafana.com/)
This stack is meant for cluster monitoring, so it is pre-configured to collect metrics from all Kubernetes components. In addition to that it delivers a default set of dashboards and alerting rules. Many of the useful dashboards and alerts come from the [kubernetes-mixin project](https://github.com/kubernetes-monitoring/kubernetes-mixin), similar to this project it provides composable jsonnet as a library for users to customize to their needs.
## Table of contents
- [kube-prometheus](#kube-prometheus)
- [Table of contents](#table-of-contents)
- [Prerequisites](#prerequisites)
- [minikube](#minikube)
- [Compatibility](#compatibility)
- [Kubernetes compatibility matrix](#kubernetes-compatibility-matrix)
- [Quickstart](#quickstart)
- [Access the dashboards](#access-the-dashboards)
- [Customizing Kube-Prometheus](#customizing-kube-prometheus)
- [Installing](#installing)
- [Compiling](#compiling)
- [Apply the kube-prometheus stack](#apply-the-kube-prometheus-stack)
- [Containerized Installing and Compiling](#containerized-installing-and-compiling)
- [Update from upstream project](#update-from-upstream-project)
- [Update jb](#update-jb)
- [Update kube-prometheus](#update-kube-prometheus)
- [Compile the manifests and apply](#compile-the-manifests-and-apply)
- [Configuration](#configuration)
- [Customization Examples](#customization-examples)
- [Cluster Creation Tools](#cluster-creation-tools)
- [Internal Registry](#internal-registry)
- [NodePorts](#nodeports)
- [Prometheus Object Name](#prometheus-object-name)
- [node-exporter DaemonSet namespace](#node-exporter-daemonset-namespace)
- [Alertmanager configuration](#alertmanager-configuration)
- [Adding additional namespaces to monitor](#adding-additional-namespaces-to-monitor)
- [Defining the ServiceMonitor for each additional Namespace](#defining-the-servicemonitor-for-each-additional-namespace)
- [Static etcd configuration](#static-etcd-configuration)
- [Pod Anti-Affinity](#pod-anti-affinity)
- [Customizing Prometheus alerting/recording rules and Grafana dashboards](#customizing-prometheus-alertingrecording-rules-and-grafana-dashboards)
- [Exposing Prometheus/Alermanager/Grafana via Ingress](#exposing-prometheusalermanagergrafana-via-ingress)
- [Minikube Example](#minikube-example)
- [Troubleshooting](#troubleshooting)
- [Error retrieving kubelet metrics](#error-retrieving-kubelet-metrics)
- [Authentication problem](#authentication-problem)
- [Authorization problem](#authorization-problem)
- [kube-state-metrics resource usage](#kube-state-metrics-resource-usage)
- [Contributing](#contributing)
## Prerequisites
You will need a Kubernetes cluster, that's it! By default it is assumed, that the kubelet uses token authentication and authorization, as otherwise Prometheus needs a client certificate, which gives it full access to the kubelet, rather than just the metrics. Token authentication and authorization allows more fine grained and easier access control.
This means the kubelet configuration must contain these flags:
* `--authentication-token-webhook=true` This flag enables, that a `ServiceAccount` token can be used to authenticate against the kubelet(s). This can also be enabled by setting the kubelet configuration value `authentication.webhook.enabled` to `true`.
* `--authorization-mode=Webhook` This flag enables, that the kubelet will perform an RBAC request with the API to determine, whether the requesting entity (Prometheus in this case) is allow to access a resource, in specific for this project the `/metrics` endpoint. This can also be enabled by setting the kubelet configuration value `authorization.mode` to `Webhook`.
* `--authentication-token-webhook=true` This flag enables, that a `ServiceAccount` token can be used to authenticate against the kubelet(s). This can also be enabled by setting the kubelet configuration value `authentication.webhook.enabled` to `true`.
* `--authorization-mode=Webhook` This flag enables, that the kubelet will perform an RBAC request with the API to determine, whether the requesting entity (Prometheus in this case) is allowed to access a resource, in specific for this project the `/metrics` endpoint. This can also be enabled by setting the kubelet configuration value `authorization.mode` to `Webhook`.
This stack provides [resource metrics](https://github.com/kubernetes/metrics#resource-metrics-api) by deploying the [Prometheus Adapter](https://github.com/DirectXMan12/k8s-prometheus-adapter/).
This adapter is an Extension API Server and Kubernetes needs to be have this feature enabled, otherwise the adapter has no effect, but is still deployed.
This stack provides [resource metrics](https://github.com/kubernetes/metrics#resource-metrics-api) by deploying
the [Prometheus Adapter](https://github.com/kubernetes-sigs/prometheus-adapter).
This adapter is an Extension API Server and Kubernetes needs to be have this feature enabled, otherwise the adapter has
no effect, but is still deployed.
## Compatibility
The following Kubernetes versions are supported and work as we test against these versions in their respective branches. But note that other versions might work!
| kube-prometheus stack | Kubernetes 1.23 | Kubernetes 1.24 | Kubernetes 1.25 | Kubernetes 1.26 | Kubernetes 1.27 | Kubernetes 1.28 | Kubernetes 1.29 | Kubernetes 1.30 | Kubernetes 1.31 |
|--------------------------------------------------------------------------------------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|
| [`release-0.11`](https://github.com/prometheus-operator/kube-prometheus/tree/release-0.11) | ✔ | ✔ | ✗ | x | x | x | x | x | x |
| [`release-0.12`](https://github.com/prometheus-operator/kube-prometheus/tree/release-0.12) | ✗ | ✔ | ✔ | x | x | x | x | x | x |
| [`release-0.13`](https://github.com/prometheus-operator/kube-prometheus/tree/release-0.13) | ✗ | ✗ | x | ✔ | ✔ | ✔ | x | x | x |
| [`release-0.14`](https://github.com/prometheus-operator/kube-prometheus/tree/release-0.14) | ✗ | ✗ | x | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| [`main`](https://github.com/prometheus-operator/kube-prometheus/tree/main) | ✗ | ✗ | x | x | ✔ | ✔ | ✔ | ✔ | ✔ |
## Quickstart
This project is intended to be used as a library (i.e. the intent is not for you to create your own modified copy of this repository).
Though for a quickstart a compiled version of the Kubernetes [manifests](manifests) generated with this library (specifically with `example.jsonnet`) is checked into this repository in order to try the content out quickly. To try out the stack un-customized run:
* Create the monitoring stack using the config in the `manifests` directory:
```shell
# Create the namespace and CRDs, and then wait for them to be available before creating the remaining resources
# Note that due to some CRD size we are using kubectl server-side apply feature which is generally available since kubernetes 1.22.
# If you are using previous kubernetes versions this feature may not be available and you would need to use kubectl create instead.
kubectl apply --server-side -f manifests/setup
kubectl wait \
--for condition=Established \
--all CustomResourceDefinition \
--namespace=monitoring
kubectl apply -f manifests/
```
We create the namespace and CustomResourceDefinitions first to avoid race conditions when deploying the monitoring components.
Alternatively, the resources in both folders can be applied with a single command
`kubectl apply --server-side -f manifests/setup -f manifests`, but it may be necessary to run the command multiple times for all components to
be created successfully.
* And to teardown the stack:
```shell
kubectl delete --ignore-not-found=true -f manifests/ -f manifests/setup
```
### minikube
To try out this stack, start [minikube](https://github.com/kubernetes/minikube) with the following command:
```shell
$ minikube delete && minikube start --kubernetes-version=v1.18.1 --memory=6g --bootstrapper=kubeadm --extra-config=kubelet.authentication-token-webhook=true --extra-config=kubelet.authorization-mode=Webhook --extra-config=scheduler.address=0.0.0.0 --extra-config=controller-manager.address=0.0.0.0
$ minikube delete && minikube start --kubernetes-version=v1.23.0 --memory=6g --bootstrapper=kubeadm --extra-config=kubelet.authentication-token-webhook=true --extra-config=kubelet.authorization-mode=Webhook --extra-config=scheduler.bind-address=0.0.0.0 --extra-config=controller-manager.bind-address=0.0.0.0
```
The kube-prometheus stack includes a resource metrics API server, so the metrics-server addon is not necessary. Ensure the metrics-server addon is disabled on minikube:
@@ -85,646 +93,29 @@ The kube-prometheus stack includes a resource metrics API server, so the metrics
$ minikube addons disable metrics-server
```
## Compatibility
## Getting started
### Kubernetes compatibility matrix
Before deploying kube-prometheus in a production environment, read:
The following versions are supported and work as we test against these versions in their respective branches. But note that other versions might work!
1. [Customizing kube-prometheus](docs/customizing.md)
2. [Customization examples](docs/customizations)
3. [Accessing Graphical User Interfaces](docs/access-ui.md)
4. [Troubleshooting kube-prometheus](docs/troubleshooting.md)
| kube-prometheus stack | Kubernetes 1.14 | Kubernetes 1.15 | Kubernetes 1.16 | Kubernetes 1.17 | Kubernetes 1.18 | Kubernetes 1.19 |
|-----------------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|
| `release-0.3` | ✔ | ✔ | ✔ | ✔ | ✗ | ✗ |
| `release-0.4` | ✗ | ✗ | ✔ (v1.16.5+) | ✔ | ✗ | ✗ |
| `release-0.5` | ✗ | ✗ | ✗ | ✗ | ✔ | ✗ |
| `release-0.6` | ✗ | ✗ | ✗ | ✗ | ✔ | ✗ |
| `HEAD` | ✗ | ✗ | ✗ | ✗ | ✔ | ✗ |
## Documentation
Note: Due to [two](https://github.com/kubernetes/kubernetes/issues/83778) [bugs](https://github.com/kubernetes/kubernetes/issues/86359) in Kubernetes v1.16.1, and prior to Kubernetes v1.16.5 the kube-prometheus release-0.4 branch only supports v1.16.5 and higher. The `extension-apiserver-authentication-reader` role in the kube-system namespace can be manually edited to include list and watch permissions in order to workaround the second issue with Kubernetes v1.16.2 through v1.16.4.
## Quickstart
>Note: For versions before Kubernetes v1.18.z refer to the [Kubernetes compatibility matrix](#kubernetes-compatibility-matrix) in order to choose a compatible branch.
This project is intended to be used as a library (i.e. the intent is not for you to create your own modified copy of this repository).
Though for a quickstart a compiled version of the Kubernetes [manifests](manifests) generated with this library (specifically with `example.jsonnet`) is checked into this repository in order to try the content out quickly. To try out the stack un-customized run:
* Create the monitoring stack using the config in the `manifests` directory:
```shell
# Create the namespace and CRDs, and then wait for them to be availble before creating the remaining resources
kubectl create -f manifests/setup
until kubectl get servicemonitors --all-namespaces ; do date; sleep 1; echo ""; done
kubectl create -f manifests/
```
We create the namespace and CustomResourceDefinitions first to avoid race conditions when deploying the monitoring components.
Alternatively, the resources in both folders can be applied with a single command
`kubectl create -f manifests/setup -f manifests`, but it may be necessary to run the command multiple times for all components to
be created successfullly.
* And to teardown the stack:
```shell
kubectl delete --ignore-not-found=true -f manifests/ -f manifests/setup
```
### Access the dashboards
Prometheus, Grafana, and Alertmanager dashboards can be accessed quickly using `kubectl port-forward` after running the quickstart via the commands below. Kubernetes 1.10 or later is required.
> Note: There are instructions on how to route to these pods behind an ingress controller in the [Exposing Prometheus/Alermanager/Grafana via Ingress](#exposing-prometheusalermanagergrafana-via-ingress) section.
Prometheus
```shell
$ kubectl --namespace monitoring port-forward svc/prometheus-k8s 9090
```
Then access via [http://localhost:9090](http://localhost:9090)
Grafana
```shell
$ kubectl --namespace monitoring port-forward svc/grafana 3000
```
Then access via [http://localhost:3000](http://localhost:3000) and use the default grafana user:password of `admin:admin`.
Alert Manager
```shell
$ kubectl --namespace monitoring port-forward svc/alertmanager-main 9093
```
Then access via [http://localhost:9093](http://localhost:9093)
## Customizing Kube-Prometheus
This section:
* describes how to customize the kube-prometheus library via compiling the kube-prometheus manifests yourself (as an alternative to the [Quickstart section](#Quickstart)).
* still doesn't require you to make a copy of this entire repository, but rather only a copy of a few select files.
### Installing
The content of this project consists of a set of [jsonnet](http://jsonnet.org/) files making up a library to be consumed.
Install this library in your own project with [jsonnet-bundler](https://github.com/jsonnet-bundler/jsonnet-bundler#install) (the jsonnet package manager):
```shell
$ mkdir my-kube-prometheus; cd my-kube-prometheus
$ jb init # Creates the initial/empty `jsonnetfile.json`
# Install the kube-prometheus dependency
$ jb install github.com/coreos/kube-prometheus/jsonnet/kube-prometheus@release-0.4 # Creates `vendor/` & `jsonnetfile.lock.json`, and fills in `jsonnetfile.json`
```
> `jb` can be installed with `go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb`
> An e.g. of how to install a given version of this library: `jb install github.com/coreos/kube-prometheus/jsonnet/kube-prometheus@release-0.4`
In order to update the kube-prometheus dependency, simply use the jsonnet-bundler update functionality:
```shell
$ jb update
```
### Compiling
e.g. of how to compile the manifests: `./build.sh example.jsonnet`
> before compiling, install `gojsontoyaml` tool with `go get github.com/brancz/gojsontoyaml`
Here's [example.jsonnet](example.jsonnet):
> Note: some of the following components must be configured beforehand. See [configuration](#configuration) and [customization-examples](#customization-examples).
[embedmd]:# (example.jsonnet)
```jsonnet
local kp =
(import 'kube-prometheus/kube-prometheus.libsonnet') +
// Uncomment the following imports to enable its patches
// (import 'kube-prometheus/kube-prometheus-anti-affinity.libsonnet') +
// (import 'kube-prometheus/kube-prometheus-managed-cluster.libsonnet') +
// (import 'kube-prometheus/kube-prometheus-node-ports.libsonnet') +
// (import 'kube-prometheus/kube-prometheus-static-etcd.libsonnet') +
// (import 'kube-prometheus/kube-prometheus-thanos-sidecar.libsonnet') +
// (import 'kube-prometheus/kube-prometheus-custom-metrics.libsonnet') +
{
_config+:: {
namespace: 'monitoring',
},
};
{ ['setup/0namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{
['setup/prometheus-operator-' + name]: kp.prometheusOperator[name]
for name in std.filter((function(name) name != 'serviceMonitor'), std.objectFields(kp.prometheusOperator))
} +
// serviceMonitor is separated so that it can be created after the CRDs are ready
{ 'prometheus-operator-serviceMonitor': kp.prometheusOperator.serviceMonitor } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
And here's the [build.sh](build.sh) script (which uses `vendor/` to render all manifests in a json structure of `{filename: manifest-content}`):
[embedmd]:# (build.sh)
```sh
#!/usr/bin/env bash
# This script uses arg $1 (name of *.jsonnet file to use) to generate the manifests/*.yaml files.
set -e
set -x
# only exit with zero if all commands of the pipeline exit successfully
set -o pipefail
# Make sure to use project tooling
PATH="$(pwd)/tmp/bin:${PATH}"
# Make sure to start with a clean 'manifests' dir
rm -rf manifests
mkdir -p manifests/setup
# Calling gojsontoyaml is optional, but we would like to generate yaml, not json
jsonnet -J vendor -m manifests "${1-example.jsonnet}" | xargs -I{} sh -c 'cat {} | gojsontoyaml > {}.yaml' -- {}
# Make sure to remove json files
find manifests -type f ! -name '*.yaml' -delete
rm -f kustomization
```
> Note you need `jsonnet` (`go get github.com/google/go-jsonnet/cmd/jsonnet`) and `gojsontoyaml` (`go get github.com/brancz/gojsontoyaml`) installed to run `build.sh`. If you just want json output, not yaml, then you can skip the pipe and everything afterwards.
This script runs the jsonnet code, then reads each key of the generated json and uses that as the file name, and writes the value of that key to that file, and converts each json manifest to yaml.
### Apply the kube-prometheus stack
The previous steps (compilation) has created a bunch of manifest files in the manifest/ folder.
Now simply use `kubectl` to install Prometheus and Grafana as per your configuration:
```shell
# Update the namespace and CRDs, and then wait for them to be availble before creating the remaining resources
$ kubectl apply -f manifests/setup
$ kubectl apply -f manifests/
```
Alternatively, the resources in both folders can be applied with a single command
`kubectl apply -Rf manifests`, but it may be necessary to run the command multiple times for all components to
be created successfullly.
Check the monitoring namespace (or the namespace you have specific in `namespace: `) and make sure the pods are running. Prometheus and Grafana should be up and running soon.
### Containerized Installing and Compiling
If you don't care to have `jb` nor `jsonnet` nor `gojsontoyaml` installed, then use `quay.io/coreos/jsonnet-ci` container image. Do the following from this `kube-prometheus` directory:
```shell
$ docker run --rm -v $(pwd):$(pwd) --workdir $(pwd) quay.io/coreos/jsonnet-ci jb update
$ docker run --rm -v $(pwd):$(pwd) --workdir $(pwd) quay.io/coreos/jsonnet-ci ./build.sh example.jsonnet
```
## Update from upstream project
You may wish to fetch changes made on this project so they are available to you.
### Update jb
`jb` may have been updated so it's a good idea to get the latest version of this binary:
```shell
$ go get -u github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
```
### Update kube-prometheus
The command below will sync with upstream project:
```shell
$ jb update
```
### Compile the manifests and apply
Once updated, just follow the instructions under "Compiling" and "Apply the kube-prometheus stack" to apply the changes to your cluster.
## Configuration
Jsonnet has the concept of hidden fields. These are fields, that are not going to be rendered in a result. This is used to configure the kube-prometheus components in jsonnet. In the example jsonnet code of the above [Customizing Kube-Prometheus section](#customizing-kube-prometheus), you can see an example of this, where the `namespace` is being configured to be `monitoring`. In order to not override the whole object, use the `+::` construct of jsonnet, to merge objects, this way you can override individual settings, but retain all other settings and defaults.
These are the available fields with their respective default values:
```
{
_config+:: {
namespace: "default",
versions+:: {
alertmanager: "v0.17.0",
nodeExporter: "v0.18.1",
kubeStateMetrics: "v1.5.0",
kubeRbacProxy: "v0.4.1",
prometheusOperator: "v0.30.0",
prometheus: "v2.10.0",
},
imageRepos+:: {
prometheus: "quay.io/prometheus/prometheus",
alertmanager: "quay.io/prometheus/alertmanager",
kubeStateMetrics: "quay.io/coreos/kube-state-metrics",
kubeRbacProxy: "quay.io/coreos/kube-rbac-proxy",
nodeExporter: "quay.io/prometheus/node-exporter",
prometheusOperator: "quay.io/coreos/prometheus-operator",
},
prometheus+:: {
names: 'k8s',
replicas: 2,
rules: {},
},
alertmanager+:: {
name: 'main',
config: |||
global:
resolve_timeout: 5m
route:
group_by: ['job']
group_wait: 30s
group_interval: 5m
repeat_interval: 12h
receiver: 'null'
routes:
- match:
alertname: Watchdog
receiver: 'null'
receivers:
- name: 'null'
|||,
replicas: 3,
},
kubeStateMetrics+:: {
collectors: '', // empty string gets a default set
scrapeInterval: '30s',
scrapeTimeout: '30s',
baseCPU: '100m',
baseMemory: '150Mi',
},
nodeExporter+:: {
port: 9100,
},
},
}
```
The grafana definition is located in a different project (https://github.com/brancz/kubernetes-grafana), but needed configuration can be customized from the same top level `_config` field. For example to allow anonymous access to grafana, add the following `_config` section:
```
grafana+:: {
config: { // http://docs.grafana.org/installation/configuration/
sections: {
"auth.anonymous": {enabled: true},
},
},
},
```
## Customization Examples
Jsonnet is a turing complete language, any logic can be reflected in it. It also has powerful merge functionalities, allowing sophisticated customizations of any kind simply by merging it into the object the library provides.
### Cluster Creation Tools
A common example is that not all Kubernetes clusters are created exactly the same way, meaning the configuration to monitor them may be slightly different. For [kubeadm](examples/jsonnet-snippets/kubeadm.jsonnet), [bootkube](examples/jsonnet-snippets/bootkube.jsonnet), [kops](examples/jsonnet-snippets/kops.jsonnet) and [kubespray](examples/jsonnet-snippets/kubespray.jsonnet) clusters there are mixins available to easily configure these:
kubeadm:
[embedmd]:# (examples/jsonnet-snippets/kubeadm.jsonnet)
```jsonnet
(import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/kube-prometheus-kubeadm.libsonnet')
```
bootkube:
[embedmd]:# (examples/jsonnet-snippets/bootkube.jsonnet)
```jsonnet
(import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/kube-prometheus-bootkube.libsonnet')
```
kops:
[embedmd]:# (examples/jsonnet-snippets/kops.jsonnet)
```jsonnet
(import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/kube-prometheus-kops.libsonnet')
```
kops with CoreDNS:
If your kops cluster is using CoreDNS, there is an additional mixin to import.
[embedmd]:# (examples/jsonnet-snippets/kops-coredns.jsonnet)
```jsonnet
(import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/kube-prometheus-kops.libsonnet') +
(import 'kube-prometheus/kube-prometheus-kops-coredns.libsonnet')
```
kubespray:
[embedmd]:# (examples/jsonnet-snippets/kubespray.jsonnet)
```jsonnet
(import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/kube-prometheus-kubespray.libsonnet')
```
kube-aws:
[embedmd]:# (examples/jsonnet-snippets/kube-aws.jsonnet)
```jsonnet
(import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/kube-prometheus-kube-aws.libsonnet')
```
### Internal Registry
Some Kubernetes installations source all their images from an internal registry. kube-prometheus supports this use case and helps the user synchronize every image it uses to the internal registry and generate manifests pointing at the internal registry.
To produce the `docker pull/tag/push` commands that will synchronize upstream images to `internal-registry.com/organization` (after having run the `jb` command to populate the vendor directory):
```shell
$ jsonnet -J vendor -S --tla-str repository=internal-registry.com/organization sync-to-internal-registry.jsonnet
$ docker pull k8s.gcr.io/addon-resizer:1.8.4
$ docker tag k8s.gcr.io/addon-resizer:1.8.4 internal-registry.com/organization/addon-resizer:1.8.4
$ docker push internal-registry.com/organization/addon-resizer:1.8.4
$ docker pull quay.io/prometheus/alertmanager:v0.16.2
$ docker tag quay.io/prometheus/alertmanager:v0.16.2 internal-registry.com/organization/alertmanager:v0.16.2
$ docker push internal-registry.com/organization/alertmanager:v0.16.2
...
```
The output of this command can be piped to a shell to be executed by appending `| sh`.
Then to generate manifests with `internal-registry.com/organization`, use the `withImageRepository` mixin:
[embedmd]:# (examples/internal-registry.jsonnet)
```jsonnet
local mixin = import 'kube-prometheus/kube-prometheus-config-mixins.libsonnet';
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + {
_config+:: {
namespace: 'monitoring',
},
} + mixin.withImageRepository('internal-registry.com/organization');
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
### NodePorts
Another mixin that may be useful for exploring the stack is to expose the UIs of Prometheus, Alertmanager and Grafana on NodePorts:
[embedmd]:# (examples/jsonnet-snippets/node-ports.jsonnet)
```jsonnet
(import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/kube-prometheus-node-ports.libsonnet')
```
### Prometheus Object Name
To give another customization example, the name of the `Prometheus` object provided by this library can be overridden:
[embedmd]:# (examples/prometheus-name-override.jsonnet)
```jsonnet
((import 'kube-prometheus/kube-prometheus.libsonnet') + {
prometheus+: {
prometheus+: {
metadata+: {
name: 'my-name',
},
},
},
}).prometheus.prometheus
```
### node-exporter DaemonSet namespace
Standard Kubernetes manifests are all written using [ksonnet-lib](https://github.com/ksonnet/ksonnet-lib/), so they can be modified with the mixins supplied by ksonnet-lib. For example to override the namespace of the node-exporter DaemonSet:
[embedmd]:# (examples/ksonnet-example.jsonnet)
```jsonnet
local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
local daemonset = k.apps.v1beta2.daemonSet;
((import 'kube-prometheus/kube-prometheus.libsonnet') + {
nodeExporter+: {
daemonset+:
daemonset.mixin.metadata.withNamespace('my-custom-namespace'),
},
}).nodeExporter.daemonset
```
### Alertmanager configuration
The Alertmanager configuration is located in the `_config.alertmanager.config` configuration field. In order to set a custom Alertmanager configuration simply set this field.
[embedmd]:# (examples/alertmanager-config.jsonnet)
```jsonnet
((import 'kube-prometheus/kube-prometheus.libsonnet') + {
_config+:: {
alertmanager+: {
config: |||
global:
resolve_timeout: 10m
route:
group_by: ['job']
group_wait: 30s
group_interval: 5m
repeat_interval: 12h
receiver: 'null'
routes:
- match:
alertname: Watchdog
receiver: 'null'
receivers:
- name: 'null'
|||,
},
},
}).alertmanager.secret
```
In the above example the configuration has been inlined, but can just as well be an external file imported in jsonnet via the `importstr` function.
[embedmd]:# (examples/alertmanager-config-external.jsonnet)
```jsonnet
((import 'kube-prometheus/kube-prometheus.libsonnet') + {
_config+:: {
alertmanager+: {
config: importstr 'alertmanager-config.yaml',
},
},
}).alertmanager.secret
```
### Adding additional namespaces to monitor
In order to monitor additional namespaces, the Prometheus server requires the appropriate `Role` and `RoleBinding` to be able to discover targets from that namespace. By default the Prometheus server is limited to the three namespaces it requires: default, kube-system and the namespace you configure the stack to run in via `$._config.namespace`. This is specified in `$._config.prometheus.namespaces`, to add new namespaces to monitor, simply append the additional namespaces:
[embedmd]:# (examples/additional-namespaces.jsonnet)
```jsonnet
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + {
_config+:: {
namespace: 'monitoring',
prometheus+:: {
namespaces+: ['my-namespace', 'my-second-namespace'],
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
#### Defining the ServiceMonitor for each additional Namespace
In order to Prometheus be able to discovery and scrape services inside the additional namespaces specified in previous step you need to define a ServiceMonitor resource.
> Typically it is up to the users of a namespace to provision the ServiceMonitor resource, but in case you want to generate it with the same tooling as the rest of the cluster monitoring infrastructure, this is a guide on how to achieve this.
You can define ServiceMonitor resources in your `jsonnet` spec. See the snippet bellow:
[embedmd]:# (examples/additional-namespaces-servicemonitor.jsonnet)
```jsonnet
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + {
_config+:: {
namespace: 'monitoring',
prometheus+:: {
namespaces+: ['my-namespace', 'my-second-namespace'],
},
},
prometheus+:: {
serviceMonitorMyNamespace: {
apiVersion: 'monitoring.coreos.com/v1',
kind: 'ServiceMonitor',
metadata: {
name: 'my-servicemonitor',
namespace: 'my-namespace',
},
spec: {
jobLabel: 'app',
endpoints: [
{
port: 'http-metrics',
},
],
selector: {
matchLabels: {
app: 'myapp',
},
},
},
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
> NOTE: make sure your service resources has the right labels (eg. `'app': 'myapp'`) applied. Prometheus use kubernetes labels to discovery resources inside the namespaces.
### Static etcd configuration
In order to configure a static etcd cluster to scrape there is a simple [kube-prometheus-static-etcd.libsonnet](jsonnet/kube-prometheus/kube-prometheus-static-etcd.libsonnet) mixin prepared - see [etcd.jsonnet](examples/etcd.jsonnet) for an example of how to use that mixin, and [Monitoring external etcd](docs/monitoring-external-etcd.md) for more information.
> Note that monitoring etcd in minikube is currently not possible because of how etcd is setup. (minikube's etcd binds to 127.0.0.1:2379 only, and within host networking namespace.)
### Pod Anti-Affinity
To prevent `Prometheus` and `Alertmanager` instances from being deployed onto the same node when
possible, one can include the [kube-prometheus-anti-affinity.libsonnet](jsonnet/kube-prometheus/kube-prometheus-anti-affinity.libsonnet) mixin:
```jsonnet
(import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/kube-prometheus-anti-affinity.libsonnet')
```
### Customizing Prometheus alerting/recording rules and Grafana dashboards
See [developing Prometheus rules and Grafana dashboards](docs/developing-prometheus-rules-and-grafana-dashboards.md) guide.
### Exposing Prometheus/Alermanager/Grafana via Ingress
See [exposing Prometheus/Alertmanager/Grafana](docs/exposing-prometheus-alertmanager-grafana-ingress.md) guide.
## Minikube Example
To use an easy to reproduce example, see [minikube.jsonnet](examples/minikube.jsonnet), which uses the minikube setup as demonstrated in [Prerequisites](#prerequisites). Because we would like easy access to our Prometheus, Alertmanager and Grafana UIs, `minikube.jsonnet` exposes the services as NodePort type services.
## Troubleshooting
### Error retrieving kubelet metrics
Should the Prometheus `/targets` page show kubelet targets, but not able to successfully scrape the metrics, then most likely it is a problem with the authentication and authorization setup of the kubelets.
As described in the [Prerequisites](#prerequisites) section, in order to retrieve metrics from the kubelet token authentication and authorization must be enabled. Some Kubernetes setup tools do not enable this by default.
- If you are using Google's GKE product, see [cAdvisor support](docs/GKE-cadvisor-support.md).
- If you are using AWS EKS, see [AWS EKS CNI support](docs/EKS-cni-support.md).
- If you are using Weave Net, see [Weave Net support](docs/weave-net-support.md).
#### Authentication problem
The Prometheus `/targets` page will show the kubelet job with the error `403 Unauthorized`, when token authentication is not enabled. Ensure, that the `--authentication-token-webhook=true` flag is enabled on all kubelet configurations.
#### Authorization problem
The Prometheus `/targets` page will show the kubelet job with the error `401 Unauthorized`, when token authorization is not enabled. Ensure that the `--authorization-mode=Webhook` flag is enabled on all kubelet configurations.
### kube-state-metrics resource usage
In some environments, kube-state-metrics may need additional
resources. One driver for more resource needs, is a high number of
namespaces. There may be others.
kube-state-metrics resource allocation is managed by
[addon-resizer](https://github.com/kubernetes/autoscaler/tree/master/addon-resizer/nanny)
You can control it's parameters by setting variables in the
config. They default to:
``` jsonnet
kubeStateMetrics+:: {
baseCPU: '100m',
cpuPerNode: '2m',
baseMemory: '150Mi',
memoryPerNode: '30Mi',
}
```
1. [Continuous Delivery](examples/continuous-delivery)
2. [Update to new version](docs/update.md)
3. For more documentation on the project refer to `docs/` directory.
## Contributing
All `.yaml` files in the `/manifests` folder are generated via
[Jsonnet](https://jsonnet.org/). Contributing changes will most likely include
the following process:
To contribute to kube-prometheus, refer to [Contributing](CONTRIBUTING.md).
1. Make your changes in the respective `*.jsonnet` file.
2. Commit your changes (This is currently necessary due to our vendoring
process. This is likely to change in the future).
3. Update the pinned kube-prometheus dependency in `jsonnetfile.lock.json`: `jb update`
3. Generate dependent `*.yaml` files: `make generate`
4. Commit the generated changes.
## Join the discussion
If you have any questions or feedback regarding kube-prometheus, join the [kube-prometheus discussion](https://github.com/prometheus-operator/kube-prometheus/discussions). Alternatively, consider joining [the kubernetes slack #prometheus-operator channel](http://slack.k8s.io/) or project's bi-weekly [Contributor Office Hours](https://docs.google.com/document/d/1-fjJmzrwRpKmSPHtXN5u6VZnn39M28KqyQGBEJsqUOk/edit#).
## License
Apache License 2.0, see [LICENSE](https://github.com/prometheus-operator/kube-prometheus/blob/main/LICENSE).

108
RELEASE.md Normal file
View File

@@ -0,0 +1,108 @@
# Release schedule
kube-prometheus will follow the Kubernetes release schedule.
For every new Kubernetes release, there will be a corresponding minor release of
kube-prometheus, although it may not be immediate.
We do not guarantee backports from the `main` branch to older release branches.
This differs from the previous release schedule, which was driven by OpenShift releases.
# How to cut a new release
> This guide is strongly based on the [prometheus-operator release
> instructions](https://github.com/prometheus-operator/prometheus-operator/blob/master/RELEASE.md).
## Branch management and versioning strategy
We use [Semantic Versioning](http://semver.org/).
We maintain a separate branch for each minor release, named
`release-<major>.<minor>`, e.g. `release-1.1`, `release-2.0`.
The usual flow is to merge new features, changes and bug fixes into the `main` branch.
The decision to backport bugfixes into release branches is made on a case-by-case basis.
Maintaining the release branches for older minor releases is best-effort.
## Update components version
Every release of kube-prometheus should include the latest versions of each
component. Updating them is automated via a CI job that can be triggered
manually from this
[workflow](https://github.com/prometheus-operator/kube-prometheus/actions/workflows/versions.yaml).
Once the workflow is completed, the prometheus-operator bot will create some
PRs. You should merge the one prefixed by `[bot][main]` if created before
proceeding. If the bot didn't create the PR, it is either because the workflow
failed or because the main branch was already up-to-date.
## Update Kubernetes supported versions
The `main` branch of kube-prometheus should support the last 2 versions of
Kubernetes. We need to make sure that the CI on the main branch is testing the
kube-prometheus configuration against both of these versions by updating the [CI
worklow](.github/workflows/ci.yaml) to include the latest kind version and the
2 latest images versions that are attached to the kind release. Once that is
done, the [compatibility matrix](README.md#compatibility) in
the README should also be updated to reflect the CI changes.
## Create pull request to cut the release
### Pin Jsonnet dependencies
Pin jsonnet dependencies in
[jsonnetfile.json](jsonnet/kube-prometheus/jsonnetfile.json). Each dependency
should be pinned to the latest release branch or if it doesn't have one, pinned
to the latest commit.
### Start with a fresh environment
```bash
make clean
```
### Update Jsonnet dependencies
```bash
make update
```
### Generate manifests
```bash
make generate
```
### Update the compatibility matrix
Update the [compatibility matrix](README.md#compatibility) in
the README, by adding the new release based on the `main` branch compatibility
and removing the oldest release branch to only keep the latest 5 branches in the
matrix.
### Update changelog
Iterate over the PRs that were merged between the latest release of kube-prometheus and the HEAD and add the changelog entries to the [CHANGELOG](CHANGELOG.md).
## Create release branch
Once the PR cutting the release is merged, pull the changes, create a new
release branch named `release-x.y` based on the latest changes and push it to
the upstream repository.
## Create follow-up pull request
### Unpin Jsonnet dependencies
Revert previous changes made when pinning the jsonnet dependencies since we want
the main branch to be in sync with the latest changes of its dependencies.
### Update CI workflow
Update the [versions workflow](.github/workflows/versions.yaml) to include the latest release branch and remove the oldest one to reflect the list of supported releases.
### Update Kubernetes versions used by kubeconform
Update the versions of Kubernetes used when validating manifests with
kubeconform in the [Makefile](Makefile) to align with the compatibility
matrix.

View File

@@ -1,4 +1,4 @@
## CoreOS Community Code of Conduct
## Community Code of Conduct
### Contributor Code of Conduct
@@ -33,29 +33,9 @@ This code of conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting a project maintainer, Brandon Philips
<brandon.philips@coreos.com>, and/or Rithu John <rithu.john@coreos.com>.
reported by contacting a project maintainer listed in
https://github.com/prometheus-operator/prometheus-operator/blob/master/MAINTAINERS.md.
This Code of Conduct is adapted from the Contributor Covenant
(http://contributor-covenant.org), version 1.2.0, available at
http://contributor-covenant.org/version/1/2/0/
### CoreOS Events Code of Conduct
CoreOS events are working conferences intended for professional networking and
collaboration in the CoreOS community. Attendees are expected to behave
according to professional standards and in accordance with their employers
policies on appropriate workplace behavior.
While at CoreOS events or related social networking opportunities, attendees
should not engage in discriminatory or offensive speech or actions including
but not limited to gender, sexuality, race, age, disability, or religion.
Speakers should be especially aware of these concerns.
CoreOS does not condone any statements by speakers contrary to these standards.
CoreOS reserves the right to deny entrance and/or eject from an event (without
refund) any individual found to be engaging in discriminatory or offensive
speech or actions.
Please bring any concerns to the immediate attention of designated on-site
staff, Brandon Philips <brandon.philips@coreos.com>, and/or Rithu John <rithu.john@coreos.com>.

View File

@@ -0,0 +1,33 @@
# Ephemeral developer workspaces
Aiming to provide better developer experience when making contributions to kube-prometheus, whether by actively developing new features/bug fixes or by reviewing pull requests, we want to provide ephemeral developer workspaces with everything already configured (as far as tooling makes it possible).
Those developer workspaces should provide a brand new kubernetes cluster, where kube-prometheus can be easily deployed and the contributor can easily see the impact that a pull request is proposing.
Today there is 2 providers in the market:
* [Github Codespaces](https://github.com/features/codespaces)
* [Gitpod](https://www.gitpod.io/)
## Codespaces
Unfortunately, Codespaces is not available for everyone. If you are fortunate to have access to it, you can open a new workspace from a specific branch, or even from Pull Requests.
![image](https://user-images.githubusercontent.com/24193764/135522435-44b177b4-00d4-4863-b45b-2db47c8c70d0.png)
![image](https://user-images.githubusercontent.com/24193764/135522560-c64968ab-3b4e-4639-893a-c4d0a14421aa.png)
After your workspace start, you can deploy a kube-prometheus inside a Kind cluster inside by running `make deploy`.
If you are reviewing a PR, you'll have a fully-functional kubernetes cluster, generating real monitoring data that can be used to review if the proposed changes works as described.
If you are working on new features/bug fixes, you can regenerate kube-prometheus's YAML manifests with `make generate` and deploy it again with `make deploy`.
## Gitpod
Gitpod is already available to everyone to use for free. It can also run commands that we speficy in the `.gitpod.yml` file located in the root directory of the git repository, so even the cluster creation can be fully automated.
You can use the same workflow as mentioned in the [Codespaces](#codespaces) section, however Gitpod doesn't have native support for any kubernetes distribution. The workaround is to create a full QEMU Virtual Machine and deploy [k3s](https://github.com/k3s-io/k3s) inside this VM. Don't worry, this whole process is already fully automated, but due to the workaround the whole workspace may be very slow.
To open up a workspace with Gitpod, you can install the [Google Chrome extension](https://www.gitpod.io/docs/browser-extension/) to add a new button to Github UI and use it on PRs or from the main page. Or by directly typing in the browser `http://gitpod.io/#https://github.com/prometheus-operator/kube-prometheus/pull/<Pull Request Number>` or just `http://gitpod.io/#https://github.com/prometheus-operator/kube-prometheus`
![image](https://user-images.githubusercontent.com/24193764/135534546-4f6bf0e5-57cd-4e35-ad80-88bd47d64276.png)

View File

@@ -0,0 +1,35 @@
#!/bin/bash
which kind
if [[ $? != 0 ]]; then
echo 'kind not available in $PATH, installing latest kind'
# Install latest kind
curl -s https://api.github.com/repos/kubernetes-sigs/kind/releases/latest \
| grep "browser_download_url.*kind-linux-amd64" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi -
mv kind-linux-amd64 developer-workspace/codespaces/kind && chmod +x developer-workspace/codespaces/kind
export PATH=$PATH:$PWD/developer-workspace/codespaces
fi
cluster_created=$($PWD/developer-workspace/codespaces/kind get clusters 2>&1)
if [[ "$cluster_created" == "No kind clusters found." ]]; then
$PWD/developer-workspace/codespaces/kind create cluster --config $PWD/.github/workflows/kind/config.yml
else
echo "Cluster '$cluster_created' already present"
fi
helm repo add --force-update cilium https://helm.cilium.io/
helm install cilium cilium/cilium --version 1.9.13 \
--namespace kube-system \
--set nodeinit.enabled=true \
--set kubeProxyReplacement=partial \
--set hostServices.enabled=false \
--set externalIPs.enabled=true \
--set nodePort.enabled=true \
--set hostPort.enabled=true \
--set bpf.masquerade=false \
--set image.pullPolicy=IfNotPresent \
--set ipam.mode=kubernetes \
--set operator.replicas=1

View File

@@ -0,0 +1,20 @@
#!/bin/bash
kubectl apply --server-side -f manifests/setup
# Safety wait for CRDs to be working
sleep 30
kubectl apply -f manifests/
sleep 30
# Safety wait for resources to be created
kubectl rollout status -n monitoring daemonset node-exporter
kubectl rollout status -n monitoring statefulset alertmanager-main
kubectl rollout status -n monitoring statefulset prometheus-k8s
kubectl rollout status -n monitoring deployment grafana
kubectl rollout status -n monitoring deployment kube-state-metrics
kubectl port-forward -n monitoring svc/grafana 3000 > /dev/null 2>&1 &
kubectl port-forward -n monitoring svc/alertmanager-main 9093 > /dev/null 2>&1 &
kubectl port-forward -n monitoring svc/prometheus-k8s 9090 > /dev/null 2>&1 &

View File

@@ -0,0 +1,49 @@
#!/bin/bash
script_dirname="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
rootfslock="${script_dirname}/_output/rootfs/rootfs-ready.lock"
k3sreadylock="${script_dirname}/_output/rootfs/k3s-ready.lock"
if test -f "${k3sreadylock}"; then
exit 0
fi
cd $script_dirname
function waitssh() {
while ! nc -z 127.0.0.1 2222; do
sleep 0.1
done
./ssh.sh "whoami" &>/dev/null
if [ $? -ne 0 ]; then
sleep 1
waitssh
fi
}
function waitrootfs() {
while ! test -f "${rootfslock}"; do
sleep 0.1
done
}
echo "🔥 Installing everything, this will be done only one time per workspace."
echo "Waiting for the rootfs to become available, it can take a while, open the terminal #2 for progress"
waitrootfs
echo "✅ rootfs available"
echo "Waiting for the ssh server to become available, it can take a while, after this k3s is getting installed"
waitssh
echo "✅ ssh server available"
./ssh.sh "curl -sfL https://get.k3s.io | sh -"
mkdir -p ~/.kube
./scp.sh root@127.0.0.1:/etc/rancher/k3s/k3s.yaml ~/.kube/config
echo "✅ k3s server is ready"
touch "${k3sreadylock}"
# safety wait for cluster availability
sleep 30s

View File

@@ -0,0 +1,48 @@
#!/bin/bash
set -euo pipefail
img_url="https://cloud-images.ubuntu.com/hirsute/current/hirsute-server-cloudimg-amd64.tar.gz"
script_dirname="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
outdir="${script_dirname}/_output/rootfs"
rm -Rf $outdir
mkdir -p $outdir
curl -L -o "${outdir}/rootfs.tar.gz" $img_url
cd $outdir
tar -xvf rootfs.tar.gz
qemu-img resize hirsute-server-cloudimg-amd64.img +20G
sudo virt-customize -a hirsute-server-cloudimg-amd64.img --run-command 'resize2fs /dev/sda'
sudo virt-customize -a hirsute-server-cloudimg-amd64.img --root-password password:root
netconf="
network:
version: 2
renderer: networkd
ethernets:
enp0s3:
dhcp4: yes
"
# networking setup
sudo virt-customize -a hirsute-server-cloudimg-amd64.img --run-command "echo '${netconf}' > /etc/netplan/01-net.yaml"
# copy kernel modules
sudo virt-customize -a hirsute-server-cloudimg-amd64.img --copy-in /lib/modules/$(uname -r):/lib/modules
# ssh
sudo virt-customize -a hirsute-server-cloudimg-amd64.img --run-command 'apt remove openssh-server -y && apt install openssh-server -y'
sudo virt-customize -a hirsute-server-cloudimg-amd64.img --run-command "sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config"
sudo virt-customize -a hirsute-server-cloudimg-amd64.img --run-command "sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config"
# mark as ready
touch rootfs-ready.lock
echo "k3s development environment is ready"

View File

@@ -0,0 +1,14 @@
#!/bin/bash
set -xeuo pipefail
script_dirname="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
outdir="${script_dirname}/_output"
sudo qemu-system-x86_64 -kernel "/boot/vmlinuz" \
-boot c -m 3073M -hda "${outdir}/rootfs/hirsute-server-cloudimg-amd64.img" \
-net user \
-smp 8 \
-append "root=/dev/sda rw console=ttyS0,115200 acpi=off nokaslr" \
-nic user,hostfwd=tcp::2222-:22,hostfwd=tcp::6443-:6443 \
-serial mon:stdio -display none

View File

@@ -0,0 +1,3 @@
#!/bin/bash
sshpass -p 'root' scp -o StrictHostKeychecking=no -P 2222 $@

View File

@@ -0,0 +1,3 @@
#!/bin/bash
sshpass -p 'root' ssh -o StrictHostKeychecking=no -p 2222 root@127.0.0.1 "$@"

View File

@@ -4,26 +4,34 @@ AWS EKS uses [CNI](https://github.com/aws/amazon-vpc-cni-k8s) networking plugin
One fatal issue that can occur is that you run out of IP addresses in your eks cluster. (Generally happens due to error configs where pods keep scheduling).
You can monitor the `awscni` using kube-promethus with :
[embedmd]:# (../examples/eks-cni-example.jsonnet)
```jsonnet
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/kube-prometheus-eks.libsonnet') + {
_config+:: {
namespace: 'monitoring',
You can monitor the `awscni` using kube-promethus with :
```jsonnet mdox-exec="cat examples/eks-cni-example.jsonnet"
local kp = (import 'kube-prometheus/main.libsonnet') + {
values+:: {
common+: {
namespace: 'monitoring',
},
kubePrometheus+: {
platform: 'eks',
},
},
prometheusRules+:: {
groups+: [
{
name: 'example-group',
rules: [
kubernetesControlPlane+: {
prometheusRuleEksCNI+: {
spec+: {
groups+: [
{
record: 'aws_eks_available_ip',
expr: 'sum by(instance) (awscni_total_ip_addresses) - sum by(instance) (awscni_assigned_ip_addresses) < 10',
name: 'example-group',
rules: [
{
record: 'aws_eks_available_ip',
expr: 'sum by(instance) (awscni_total_ip_addresses) - sum by(instance) (awscni_assigned_ip_addresses) < 10',
},
],
},
],
},
],
},
},
};

View File

@@ -5,6 +5,7 @@ authentication. Until it does, Prometheus must use HTTP (not HTTPS)
for scraping.
You can configure this behavior through kube-prometheus with:
```
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/kube-prometheus-insecure-kubelet.libsonnet') +

46
docs/access-ui.md Normal file
View File

@@ -0,0 +1,46 @@
---
weight: 300
toc: true
title: Access Dashboards
menu:
docs:
parent: kube
images: []
draft: false
---
Prometheus, Grafana, and Alertmanager dashboards can be accessed quickly using `kubectl port-forward` after running the quickstart via the commands below.
> Kubernetes 1.10 or later is required.
You can also learn how to [expose Prometheus/Alertmanager/Grafana via Ingress](customizations/exposing-prometheus-alertmanager-grafana-ingress.md)
## Prometheus
```shell
kubectl --namespace monitoring port-forward svc/prometheus-k8s 9090
```
Open Prometheus on [http://localhost:9090](http://localhost:9090) in your browser.
Check out the [alerts](http://localhost:9090/alerts) and [rules](http://localhost:9090/rules) pages with the pre-configured rules and alerts!
This Prometheus is supposed to monitor your Kubernetes cluster and make sure to alert you if theres a problem with it.
For your own applications we recommend running one or more other instances.
## Grafana
```shell
kubectl --namespace monitoring port-forward svc/grafana 3000
```
Open Grafana on [localhost:3000](https://localhost:3000) in your browser.
You can login with the username `admin` and password `admin`.
## Alertmanager
```shell
kubectl --namespace monitoring port-forward svc/alertmanager-main 9093
```
Open Alertmanager on [localhost:9093](http://localhost:9093) in your browser.

97
docs/blackbox-exporter.md Normal file
View File

@@ -0,0 +1,97 @@
---
weight: 304
toc: true
title: Blackbox Exporter
menu:
docs:
parent: kube
lead: This guide will help you deploying the blackbox-exporter with the Probe custom resource definition.
images: []
draft: false
description: This guide will help you deploying the blackbox-exporter with the Probe custom resource definition.
date: "2021-03-08T08:49:31+00:00"
---
# Setting up a blackbox exporter
The `prometheus-operator` defines a `Probe` resource type that can be used to describe blackbox checks. To execute these, a separate component called [`blackbox_exporter`](https://github.com/prometheus/blackbox_exporter) has to be deployed, which can be scraped to retrieve the results of these checks. You can use `kube-prometheus` to set up such a blackbox exporter within your Kubernetes cluster.
## Adding blackbox exporter manifests to an existing `kube-prometheus` configuration
1. Override blackbox-related configuration parameters as needed.
2. Add the following to the list of renderers to render the blackbox exporter manifests:
```
{ ['blackbox-exporter-' + name]: kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter) }
```
## Configuration parameters influencing the blackbox exporter
* `_config.namespace`: the namespace where the various generated resources (`ConfigMap`, `Deployment`, `Service`, `ServiceAccount` and `ServiceMonitor`) will reside. This does not affect where you can place `Probe` objects; that is determined by the configuration of the `Prometheus` resource. This option is shared with other `kube-prometheus` components; defaults to `default`.
* `_config.imageRepos.blackboxExporter`: the name of the blackbox exporter image to deploy. Defaults to `quay.io/prometheus/blackbox-exporter`.
* `_config.versions.blackboxExporter`: the tag of the blackbox exporter image to deploy. Defaults to the version `kube-prometheus` was tested with.
* `_config.imageRepos.configmapReloader`: the name of the ConfigMap reloader image to deploy. Defaults to `ghcr.io/jimmidyson/configmap-reload`.
* `_config.versions.configmapReloader`: the tag of the ConfigMap reloader image to deploy. Defaults to the version `kube-prometheus` was tested with.
* `_config.resources.blackbox-exporter.requests`: the requested resources; this is used for each container. Defaults to `10m` CPU and `20Mi` RAM. See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ for details.
* `_config.resources.blackbox-exporter.limits`: the resource limits; this is used for each container. Defaults to `20m` CPU and `40Mi` RAM. See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ for details.
* `_config.blackboxExporter.port`: the exposed HTTPS port of the exporter. This is what Prometheus can scrape for metrics related to the blackbox exporter itself. Defaults to `9115`.
* `_config.blackboxExporter.internalPort`: the internal plaintext port of the exporter. Prometheus scrapes configured via `Probe` objects cannot access the HTTPS port right now, so you have to specify this port in the `url` field. Defaults to `19115`.
* `_config.blackboxExporter.replicas`: the number of exporter replicas to be deployed. Defaults to `1`.
* `_config.blackboxExporter.matchLabels`: map of the labels to be used to select resources belonging to the instance deployed. Defaults to `{ 'app.kubernetes.io/name': 'blackbox-exporter' }`
* `_config.blackboxExporter.assignLabels`: map of the labels applied to components of the instance deployed. Defaults to all the labels included in the `matchLabels` option, and additionally `app.kubernetes.io/version` is set to the version of the blackbox exporter.
* `_config.blackboxExporter.modules`: the modules available in the blackbox exporter installation, i.e. the types of checks it can perform. The default value includes most of the modules defined in the default blackbox exporter configuration: `http_2xx`, `http_post_2xx`, `tcp_connect`, `pop3s_banner`, `ssh_banner`, and `irc_banner`. `icmp` is omitted so the exporter can be run with minimum privileges, but you can add it back if needed - see the example below. See https://github.com/prometheus/blackbox_exporter/blob/master/CONFIGURATION.md for the configuration format, except you have to use JSON instead of YAML here.
* `_config.blackboxExporter.privileged`: whether the `blackbox-exporter` container should be running as non-root (`false`) or root with heavily-restricted capability set (`true`). Defaults to `true` if you have any ICMP modules defined (which need the extra permissions) and `false` otherwise.
## Complete example
```jsonnet
local kp =
(import 'kube-prometheus/kube-prometheus.libsonnet') +
{
_config+:: {
namespace: 'monitoring',
blackboxExporter+:: {
modules+:: {
icmp: {
prober: 'icmp',
},
},
},
},
};
{ ['setup/0namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{
['setup/prometheus-operator-' + name]: kp.prometheusOperator[name]
for name in std.filter((function(name) name != 'serviceMonitor'), std.objectFields(kp.prometheusOperator))
} +
// serviceMonitor is separated so that it can be created after the CRDs are ready
{ 'prometheus-operator-serviceMonitor': kp.prometheusOperator.serviceMonitor } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['blackbox-exporter-' + name]: kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
After installing the generated manifests, you can create `Probe` resources, for example:
```yaml
kind: Probe
apiVersion: monitoring.coreos.com/v1
metadata:
name: example-com-website
namespace: monitoring
spec:
interval: 60s
module: http_2xx
prober:
url: blackbox-exporter.monitoring.svc.cluster.local:19115
targets:
staticConfig:
static:
- http://example.com
- https://example.com
```

81
docs/community-support.md Normal file
View File

@@ -0,0 +1,81 @@
# Community support
For bugs, you can use the GitHub [issue tracker](https://github.com/prometheus-operator/kube-prometheus/issues/new/choose).
For questions, you can use the GitHub [discussions forum](https://github.com/prometheus-operator/kube-prometheus/discussions).
Many of the `kube-prometheus` project's contributors and users can also be found on the #prometheus-operator channel of the [Kubernetes Slack](https://slack.k8s.io/).
`kube-prometheus` is the aggregation of many projects that all have different
channels to reach out for help and support. This community strives at
supporting all users and you should never be afraid of asking us first. However
if your request relates specifically to one of the projects listed below, it is
often more efficient to reach out to the project directly. If you are unsure,
please feel free to open an issue in this repository and we will redirect you
if applicable.
## prometheus-operator
For documentation, check the project's [documentation directory](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation).
For questions, use the #prometheus-operator channel on the [Kubernetes Slack](https://slack.k8s.io/).
For bugs, use the GitHub [issue tracker](https://github.com/prometheus-operator/prometheus-operator/issues/new/choose).
## Prometheus, Alertmanager, node_exporter
For documentation, check the Prometheus [online docs](https://prometheus.io/docs/). There is a
[section](https://prometheus.io/docs/introduction/media/) with links to blog
posts, recorded talks and presentations. This [repository](https://github.com/roaldnefs/awesome-prometheus)
(not affiliated to the Prometheus project) has also a list of curated resources
related to the Prometheus ecosystem.
For questions, see the Prometheus [community page](https://prometheus.io/community/) for the various channels.
There is also a #prometheus channel on the [CNCF Slack](https://slack.cncf.io/).
## kube-state-metrics
For documentation, see the project's [docs directory](https://github.com/kubernetes/kube-state-metrics/tree/main/docs).
For questions, use the #kube-state-metrics channel on the [Kubernetes Slack](https://slack.k8s.io/).
For bugs, use the GitHub [issue tracker](https://github.com/kubernetes/kube-state-metrics/issues/new/choose).
## Kubernetes
For documentation, check the [Kubernetes docs](https://kubernetes.io/docs/home/).
For questions, use the [community forums](https://discuss.kubernetes.io/) and the [Kubernetes Slack](https://slack.k8s.io/). Check also the [community page](https://kubernetes.io/community/#discuss).
For bugs, use the GitHub [issue tracker](https://github.com/kubernetes/kubernetes/issues/new/choose).
## Prometheus adapter
For documentation, check the project's [README](https://github.com/DirectXMan12/k8s-prometheus-adapter/blob/master/README.md).
For questions, use the #sig-instrumentation channel on the [Kubernetes Slack](https://slack.k8s.io/).
For bugs, use the GitHub [issue tracker](https://github.com/DirectXMan12/k8s-prometheus-adapter/issues/new).
## Grafana
For documentation, check the [Grafana docs](https://grafana.com/docs/grafana/latest/).
For questions, use the [community forums](https://community.grafana.com/).
For bugs, use the GitHub [issue tracker](https://github.com/grafana/grafana/issues/new/choose).
## kubernetes-mixin
For documentation, check the project's [README](https://github.com/kubernetes-monitoring/kubernetes-mixin/blob/master/README.md).
For questions, use #monitoring-mixins channel on the [Kubernetes Slack](https://slack.k8s.io/).
For bugs, use the GitHub [issue tracker](https://github.com/kubernetes-monitoring/kubernetes-mixin/issues/new).
## Jsonnet
For documentation, check the [Jsonnet](https://jsonnet.org/) website.
For questions, use the [mailing list](https://groups.google.com/forum/#!forum/jsonnet).

View File

@@ -0,0 +1,40 @@
### Alertmanager configuration
The Alertmanager configuration is located in the `values.alertmanager.config` configuration field. In order to set a custom Alertmanager configuration simply set this field.
```jsonnet mdox-exec="cat examples/alertmanager-config.jsonnet"
((import 'kube-prometheus/main.libsonnet') + {
values+:: {
alertmanager+: {
config: |||
global:
resolve_timeout: 10m
route:
group_by: ['job']
group_wait: 30s
group_interval: 5m
repeat_interval: 12h
receiver: 'null'
routes:
- match:
alertname: Watchdog
receiver: 'null'
receivers:
- name: 'null'
|||,
},
},
}).alertmanager.secret
```
In the above example the configuration has been inlined, but can just as well be an external file imported in jsonnet via the `importstr` function.
```jsonnet mdox-exec="cat examples/alertmanager-config-external.jsonnet"
((import 'kube-prometheus/main.libsonnet') + {
values+:: {
alertmanager+: {
config: importstr 'alertmanager-config.yaml',
},
},
}).alertmanager.secret
```

View File

@@ -0,0 +1,56 @@
### Components' name and namespace overrides
It is possible to override the namespace where kube-prometheus is going to be deployed, like the example below:
```jsonnet
local kp = (import 'kube-prometheus/main.libsonnet') +
{
values+:: {
common+: {
namespace: 'monitoring',
},
},
};
```
If prefered, it can be changed individually by component. It is also possible to change the name of Prometheus and Alertmanager Custom Resources, like shown below:
```jsonnet mdox-exec="cat examples/name-namespace-overrides.jsonnet"
local kp = (import 'kube-prometheus/main.libsonnet') +
{
values+:: {
common+: {
namespace: 'monitoring',
},
prometheus+: {
namespace: 'foo',
name: 'bar',
},
alertmanager+: {
namespace: 'bar',
name: 'foo',
},
},
};
{ 'setup/0namespace-namespace': kp.kubePrometheus.namespace } +
// Add the restricted psp to setup
{
['setup/prometheus-operator-' + name]: kp.prometheusOperator[name]
for name in std.filter((function(name) name != 'serviceMonitor' && name != 'prometheusRule'), std.objectFields(kp.prometheusOperator))
} +
// serviceMonitor and prometheusRule are separated so that they can be created after the CRDs are ready
{ 'prometheus-operator-serviceMonitor': kp.prometheusOperator.serviceMonitor } +
{ 'prometheus-operator-prometheusRule': kp.prometheusOperator.prometheusRule } +
{ 'kube-prometheus-prometheusRule': kp.kubePrometheus.prometheusRule } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['blackbox-exporter-' + name]: kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['kubernetes-' + name]: kp.kubernetesControlPlane[name] for name in std.objectFields(kp.kubernetesControlPlane) }
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) }
```

View File

@@ -0,0 +1,590 @@
---
weight: 307
toc: true
title: Prometheus Rules and Grafana Dashboards
menu:
docs:
parent: kube
lead: This guide will help you adding Prometheus Rules and Grafana Dashboards on top of kube-prometheus
images: []
draft: false
description: This guide will help you adding Prometheus Rules and Grafana Dashboards on top of kube-prometheus
---
`kube-prometheus` ships with a set of default [Prometheus rules](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/) and [Grafana](http://grafana.com/) dashboards. At some point one might like to extend them, the purpose of this document is to explain how to do this.
All manifests of kube-prometheus are generated using [jsonnet](https://jsonnet.org/).
Prometheus rules and Grafana dashboards in specific follow the
[Prometheus Monitoring Mixins proposal](https://github.com/monitoring-mixins/docs/blob/master/design.pdf).
For both the Prometheus rules and the Grafana dashboards Kubernetes `ConfigMap`s are generated within kube-prometheus. In order to add additional rules and dashboards simply merge them onto the existing json objects. This document illustrates examples for rules as well as dashboards.
As a basis, all examples in this guide are based on the base example of the kube-prometheus [readme](https://github.com/prometheus-operator/kube-prometheus/blob/main/README.md):
```jsonnet mdox-exec="cat example.jsonnet"
local kp =
(import 'kube-prometheus/main.libsonnet') +
// Uncomment the following imports to enable its patches
// (import 'kube-prometheus/addons/anti-affinity.libsonnet') +
// (import 'kube-prometheus/addons/managed-cluster.libsonnet') +
// (import 'kube-prometheus/addons/node-ports.libsonnet') +
// (import 'kube-prometheus/addons/static-etcd.libsonnet') +
// (import 'kube-prometheus/addons/custom-metrics.libsonnet') +
// (import 'kube-prometheus/addons/external-metrics.libsonnet') +
// (import 'kube-prometheus/addons/pyrra.libsonnet') +
{
values+:: {
common+: {
namespace: 'monitoring',
},
},
};
{ 'setup/0namespace-namespace': kp.kubePrometheus.namespace } +
{
['setup/prometheus-operator-' + name]: kp.prometheusOperator[name]
for name in std.filter((function(name) name != 'serviceMonitor' && name != 'prometheusRule'), std.objectFields(kp.prometheusOperator))
} +
// { 'setup/pyrra-slo-CustomResourceDefinition': kp.pyrra.crd } +
// serviceMonitor and prometheusRule are separated so that they can be created after the CRDs are ready
{ 'prometheus-operator-serviceMonitor': kp.prometheusOperator.serviceMonitor } +
{ 'prometheus-operator-prometheusRule': kp.prometheusOperator.prometheusRule } +
{ 'kube-prometheus-prometheusRule': kp.kubePrometheus.prometheusRule } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['blackbox-exporter-' + name]: kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } +
// { ['pyrra-' + name]: kp.pyrra[name] for name in std.objectFields(kp.pyrra) if name != 'crd' } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['kubernetes-' + name]: kp.kubernetesControlPlane[name] for name in std.objectFields(kp.kubernetesControlPlane) }
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) }
```
## Prometheus rules
### Alerting rules
As per the [Prometheus Monitoring Mixins proposal](https://github.com/monitoring-mixins/docs/blob/master/design.pdf)
Prometheus alerting rules are under the key `prometheusAlerts` in the top level object.
Additional alerting rules can be added by merging into the existing object.
The format is exactly the Prometheus format, so there should be no changes necessary should you have existing rules that you want to include.
> Note that alerts can also be included into this file, using the jsonnet `import` function.
> In this example it is just inlined in order to demonstrate their use in a single file.
```jsonnet mdox-exec="cat examples/prometheus-additional-alert-rule-example.jsonnet"
local kp = (import 'kube-prometheus/main.libsonnet') + {
values+:: {
common+: {
namespace: 'monitoring',
},
},
exampleApplication: {
prometheusRuleExample: {
apiVersion: 'monitoring.coreos.com/v1',
kind: 'PrometheusRule',
metadata: {
name: 'my-prometheus-rule',
namespace: $.values.common.namespace,
},
spec: {
groups: [
{
name: 'example-group',
rules: [
{
alert: 'ExampleAlert',
expr: 'vector(1)',
labels: {
severity: 'warning',
},
annotations: {
description: 'This is an example alert.',
},
},
],
},
],
},
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } +
{ ['example-application-' + name]: kp.exampleApplication[name] for name in std.objectFields(kp.exampleApplication) }
```
### Recording rules
In order to add a recording rule, simply do the same with the `prometheusRules` field.
> Note that rules can just as well be included into this file, using the jsonnet `import` function.
> In this example it is just inlined in order to demonstrate their use in a single file.
```jsonnet mdox-exec="cat examples/prometheus-additional-recording-rule-example.jsonnet"
local kp = (import 'kube-prometheus/main.libsonnet') + {
values+:: {
common+: {
namespace: 'monitoring',
},
},
exampleApplication: {
prometheusRuleExample: {
apiVersion: 'monitoring.coreos.com/v1',
kind: 'PrometheusRule',
metadata: {
name: 'my-prometheus-rule',
namespace: $.values.common.namespace,
},
spec: {
groups: [
{
name: 'example-group',
rules: [
{
record: 'some_recording_rule_name',
expr: 'vector(1)',
},
],
},
],
},
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } +
{ ['example-application-' + name]: kp.exampleApplication[name] for name in std.objectFields(kp.exampleApplication) }
```
### Pre-rendered rules
We acknowledge, that users may need to transition existing rules, and therefore allow an option to add additional pre-rendered rules. Luckily the yaml and json formats are very close so the yaml rules just need to be converted to json without any manual interaction needed. Just a tool to convert yaml to json is needed:
```
go get -u -v github.com/brancz/gojsontoyaml
```
And convert the existing rule file:
```
cat existingrule.yaml | gojsontoyaml -yamltojson > existingrule.json
```
Then import it in jsonnet:
```jsonnet mdox-exec="cat examples/prometheus-additional-rendered-rule-example.jsonnet"
local kp = (import 'kube-prometheus/main.libsonnet') + {
values+:: {
common+: {
namespace: 'monitoring',
},
},
exampleApplication: {
prometheusRuleExample: {
apiVersion: 'monitoring.coreos.com/v1',
kind: 'PrometheusRule',
metadata: {
name: 'my-prometheus-rule',
namespace: $.values.common.namespace,
},
spec: {
groups: (import 'existingrule.json').groups,
},
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } +
{ ['example-application-' + name]: kp.exampleApplication[name] for name in std.objectFields(kp.exampleApplication) }
```
### Changing default rules
Along with adding additional rules, we give the user the option to filter or adjust the existing rules imported by `kube-prometheus/main.libsonnet`.
The recording rules can be found in [kube-prometheus/components/mixin/rules](https://github.com/prometheus-operator/kube-prometheus/tree/main/jsonnet/kube-prometheus/components/mixin/rules)
and [kubernetes-mixin/rules](https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/rules).
The alerting rules can be found in [kube-prometheus/components/mixin/alerts](https://github.com/prometheus-operator/kube-prometheus/tree/main/jsonnet/kube-prometheus/components/mixin/alerts)
and [kubernetes-mixin/alerts](https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/alerts).
Knowing which rules to change, the user can now use functions from the [Jsonnet standard library](https://jsonnet.org/ref/stdlib.html) to make these changes.
Below are examples of both a filter and an adjustment being made to the default rules.
These changes can be assigned to a local variable and then added to the `local kp` object as seen in the examples above.
#### Filter
Here the alert `KubeStatefulSetReplicasMismatch` is being filtered out of the group `kubernetes-apps`.
The default rule can be seen [here](https://github.com/kubernetes-monitoring/kubernetes-mixin/blob/master/alerts/apps_alerts.libsonnet).
You first need to find out in which component the rule is defined (here it is kuberentesControlPlane).
```jsonnet
local filter = {
kubernetesControlPlane+: {
prometheusRule+: {
spec+: {
groups: std.map(
function(group)
if group.name == 'kubernetes-apps' then
group {
rules: std.filter(
function(rule)
rule.alert != 'KubeStatefulSetReplicasMismatch',
group.rules
),
}
else
group,
super.groups
),
},
},
},
};
```
#### Adjustment
Here the expression for another alert in the same component is updated from its previous value.
The default rule can be seen [here](https://github.com/kubernetes-monitoring/kubernetes-mixin/blob/master/alerts/apps_alerts.libsonnet).
```jsonnet
local update = {
kubernetesControlPlane+: {
prometheusRule+: {
spec+: {
groups: std.map(
function(group)
if group.name == 'kubernetes-apps' then
group {
rules: std.map(
function(rule)
if rule.alert == 'KubePodCrashLooping' then
rule {
expr: 'rate(kube_pod_container_status_restarts_total{namespace=kube-system,job="kube-state-metrics"}[10m]) * 60 * 5 > 0',
}
else
rule,
group.rules
),
}
else
group,
super.groups
),
},
},
},
};
```
Using the example from above about adding in pre-rendered rules, the new local variables can be added in as follows:
```jsonnet
local add = {
exampleApplication:: {
prometheusRule+: {
apiVersion: 'monitoring.coreos.com/v1',
kind: 'PrometheusRule',
metadata: {
name: 'example-application-rules',
namespace: $.values.common.namespace,
},
spec: (import 'existingrule.json'),
},
},
};
local kp = (import 'kube-prometheus/main.libsonnet') + filter + update + add;
local kp = (import 'kube-prometheus/main.libsonnet') +
filter +
update +
add + {
values+:: {
common+: {
namespace: 'monitoring',
},
},
};
{ 'setup/0namespace-namespace': kp.kubePrometheus.namespace } +
{
['setup/prometheus-operator-' + name]: kp.prometheusOperator[name]
for name in std.filter((function(name) name != 'serviceMonitor' && name != 'prometheusRule'), std.objectFields(kp.prometheusOperator))
} +
// serviceMonitor and prometheusRule are separated so that they can be created after the CRDs are ready
{ 'prometheus-operator-serviceMonitor': kp.prometheusOperator.serviceMonitor } +
{ 'prometheus-operator-prometheusRule': kp.prometheusOperator.prometheusRule } +
{ 'kube-prometheus-prometheusRule': kp.kubePrometheus.prometheusRule } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['blackbox-exporter-' + name]: kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } +
{ ['kubernetes-' + name]: kp.kubernetesControlPlane[name] for name in std.objectFields(kp.kubernetesControlPlane) } +
{ ['exampleApplication-' + name]: kp.exampleApplication[name] for name in std.objectFields(kp.exampleApplication) }
```
## Dashboards
Dashboards can either be added using jsonnet or simply a pre-rendered json dashboard.
### Jsonnet dashboard
We recommend using the [grafonnet](https://github.com/grafana/grafonnet-lib/) library for jsonnet,
which gives you a simple DSL to generate Grafana dashboards.
Following the [Prometheus Monitoring Mixins proposal](https://github.com/monitoring-mixins/docs/blob/master/design.pdf)
additional dashboards are added to the `grafanaDashboards` key, located in the top level object.
To add new jsonnet dashboards, simply add one.
> Note that dashboards can just as well be included into this file, using the jsonnet `import` function.
> In this example it is just inlined in order to demonstrate their use in a single file.
```jsonnet mdox-exec="cat examples/grafana-additional-jsonnet-dashboard-example.jsonnet"
local grafana = import 'grafonnet/grafana.libsonnet';
local dashboard = grafana.dashboard;
local row = grafana.row;
local prometheus = grafana.prometheus;
local template = grafana.template;
local graphPanel = grafana.graphPanel;
local kp = (import 'kube-prometheus/main.libsonnet') + {
values+:: {
common+:: {
namespace: 'monitoring',
},
grafana+: {
dashboards+:: {
'my-dashboard.json':
dashboard.new('My Dashboard')
.addTemplate(
{
current: {
text: 'Prometheus',
value: 'Prometheus',
},
hide: 0,
label: null,
name: 'datasource',
options: [],
query: 'prometheus',
refresh: 1,
regex: '',
type: 'datasource',
},
)
.addRow(
row.new()
.addPanel(graphPanel.new('My Panel', span=6, datasource='$datasource')
.addTarget(prometheus.target('vector(1)')))
),
},
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
### Pre-rendered Grafana dashboards
As jsonnet is a superset of json, the jsonnet `import` function can be used to include Grafana dashboard json blobs.
In this example we are importing a [provided example dashboard](https://github.com/prometheus-operator/kube-prometheus/tree/main/examples/example-grafana-dashboard.json).
```jsonnet mdox-exec="cat examples/grafana-additional-rendered-dashboard-example.jsonnet"
local kp = (import 'kube-prometheus/main.libsonnet') + {
values+:: {
common+:: {
namespace: 'monitoring',
},
grafana+: {
dashboards+:: { // use this method to import your dashboards to Grafana
'my-dashboard.json': (import 'example-grafana-dashboard.json'),
},
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
In case you have lots of json dashboard exported out from grafana UI the above approach is going to take lots of time.
To improve performance we can use `rawDashboards` field and provide it's value as json string by using `importstr`
```jsonnet mdox-exec="cat examples/grafana-additional-rendered-dashboard-example-2.jsonnet"
local kp = (import 'kube-prometheus/main.libsonnet') + {
values+:: {
common+:: {
namespace: 'monitoring',
},
grafana+: {
rawDashboards+:: {
'my-dashboard.json': (importstr 'example-grafana-dashboard.json'),
},
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
### Mixins
Kube-prometheus comes with a couple of default mixins as the Kubernetes-mixin and the Node-exporter mixin,
however there [are many more mixins](https://monitoring.mixins.dev/).
To use other mixins, kube-prometheus has a jsonnet library for creating a PrometheusRule CRD and Grafana dashboards from a mixin.
Below is an example of creating a mixin object that has Prometheus rules and Grafana dashboards:
```jsonnet
// Import the library function for adding mixins
local addMixin = (import 'kube-prometheus/lib/mixin.libsonnet');
// Create your mixin
local myMixin = addMixin({
name: 'myMixin',
mixin: import 'my-mixin/mixin.libsonnet',
});
```
The myMixin object will have two objects - `prometheusRules` and `grafanaDashboards`. The `grafanaDashboards` object will be needed to be added to the `dashboards` field as in the example below:
```jsonnet
values+:: {
grafana+:: {
dashboards+:: myMixin.grafanaDashboards
```
The `prometheusRules` object is a PrometheusRule CRD. It should be defined as its own jsonnet object.
If you define multiple mixins in a single jsonnet object, there is a possibility that they will overwrite each others'
configuration and there will be unintended effects.
Therefore, use the `prometheusRules` object as its own jsonnet object:
```jsonnet
...
{ ['kubernetes-' + name]: kp.kubernetesControlPlane[name] for name in std.objectFields(kp.kubernetesControlPlane) }
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ 'external-mixins/my-mixin-prometheus-rules': myMixin.prometheusRules } // one object for each mixin
```
As mentioned above each mixin is configurable and you would configure the mixin as in the example below:
```jsonnet
local myMixin = addMixin({
name: 'myMixin',
mixin: (import 'my-mixin/mixin.libsonnet') + {
_config+:: {
myMixinSelector: 'my-selector',
interval: '30d', // example
},
},
});
```
The library has also two optional parameters - the namespace for the `PrometheusRule` CRD and the dashboard folder for the Grafana dashboards.
The below example shows how to use both:
```jsonnet
local myMixin = addMixin({
name: 'myMixin',
namespace: 'prometheus', // default is monitoring
dashboardFolder: 'Observability',
mixin: (import 'my-mixin/mixin.libsonnet') + {
_config+:: {
myMixinSelector: 'my-selector',
interval: '30d', // example
},
},
});
```
The created `prometheusRules` object will have the metadata field `namespace` added and the usage will remain the same.
However, the `grafanaDasboards` will be added to the `folderDashboards` field instead of the `dashboards` field as shown in the example below:
```jsonnet
values+:: {
grafana+:: {
folderDashboards+:: {
Kubernetes: {
...
},
Misc: {
'grafana-home.json': import 'dashboards/misc/grafana-home.json',
},
} + myMixin.grafanaDashboards
```
Full example of including etcd mixin using method described above:
```jsonnet mdox-exec="cat examples/mixin-inclusion.jsonnet"
local addMixin = (import 'kube-prometheus/lib/mixin.libsonnet');
local etcdMixin = addMixin({
name: 'etcd',
mixin: (import 'github.com/etcd-io/etcd/contrib/mixin/mixin.libsonnet') + {
_config+: {}, // mixin configuration object
},
});
local kp = (import 'kube-prometheus/main.libsonnet') +
{
values+:: {
common+: {
namespace: 'monitoring',
},
grafana+: {
// Adding new dashboard to grafana. This will modify grafana configMap with dashboards
dashboards+: etcdMixin.grafanaDashboards,
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } +
// Rendering prometheusRules object. This is an object compatible with prometheus-operator CRD definition for prometheusRule
{ 'external-mixins/etcd-mixin-prometheus-rules': etcdMixin.prometheusRules }
```

View File

@@ -0,0 +1,41 @@
### Dropping unwanted dashboards
When deploying kube-prometheus, your Grafana instance is deployed with a lot of dashboards by default. All those dashboards are comming from upstream projects like [kubernetes-mixin](https://github.com/kubernetes-monitoring/kubernetes-mixin), [prometheus-mixin](https://github.com/prometheus/prometheus/tree/main/documentation/prometheus-mixin) and [node-exporter-mixin](https://github.com/prometheus/node_exporter/tree/master/docs/node-mixin), among others.
In case you find out that you don't need some of them, you can choose to remove those dashboards like in the example below, which removes the [`alertmanager-overview.json`](https://github.com/prometheus/alertmanager/blob/main/doc/alertmanager-mixin/dashboards/overview.libsonnet) dashboard.
```jsonnet mdox-exec="cat examples/drop-dashboards.jsonnet"
local kp =
(import 'kube-prometheus/main.libsonnet') +
{
values+:: {
common+: {
namespace: 'monitoring',
},
grafana+: {
dashboards: std.mergePatch(super.dashboards, {
// Add more unwanted dashboards here
'alertmanager-overview.json': null,
}),
},
},
};
{ 'setup/0namespace-namespace': kp.kubePrometheus.namespace } +
{
['setup/prometheus-operator-' + name]: kp.prometheusOperator[name]
for name in std.filter((function(name) name != 'serviceMonitor' && name != 'prometheusRule'), std.objectFields(kp.prometheusOperator))
} +
// serviceMonitor and prometheusRule are separated so that they can be created after the CRDs are ready
{ 'prometheus-operator-serviceMonitor': kp.prometheusOperator.serviceMonitor } +
{ 'prometheus-operator-prometheusRule': kp.prometheusOperator.prometheusRule } +
{ 'kube-prometheus-prometheusRule': kp.kubePrometheus.prometheusRule } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['blackbox-exporter-' + name]: kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['kubernetes-' + name]: kp.kubernetesControlPlane[name] for name in std.objectFields(kp.kubernetesControlPlane) }
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) }
```

View File

@@ -1,12 +1,23 @@
# Exposing Prometheus, Alertmanager and Grafana UIs via Ingress
---
weight: 303
toc: true
title: Expose via Ingress
menu:
docs:
parent: kube
lead: This guide will help you deploying a Kubernetes Ingress to expose Prometheus, Alertmanager and Grafana.
images: []
draft: false
description: This guide will help you deploying a Kubernetes Ingress to expose Prometheus, Alertmanager and Grafana.
---
In order to access the web interfaces via the Internet [Kubernetes Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) is a popular option. This guide explains, how Kubernetes Ingress can be setup, in order to expose the Prometheus, Alertmanager and Grafana UIs, that are included in the [kube-prometheus](https://github.com/coreos/kube-prometheus) project.
In order to access the web interfaces via the Internet [Kubernetes Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) is a popular option. This guide explains, how Kubernetes Ingress can be setup, in order to expose the Prometheus, Alertmanager and Grafana UIs, that are included in the [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus) project.
Note: before continuing, it is recommended to first get familiar with the [kube-prometheus](https://github.com/coreos/kube-prometheus) stack by itself.
Note: before continuing, it is recommended to first get familiar with the [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus) stack by itself.
## Prerequisites
Apart from a running Kubernetes cluster with a running [kube-prometheus](https://github.com/coreos/kube-prometheus) stack, a Kubernetes Ingress controller must be installed and functional. This guide was tested with the [nginx-ingress-controller](https://github.com/kubernetes/ingress-nginx). If you wish to reproduce the exact result in as depicted in this guide we recommend using the nginx-ingress-controller.
Apart from a running Kubernetes cluster with a running [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus) stack, a Kubernetes Ingress controller must be installed and functional. This guide was tested with the [nginx-ingress-controller](https://github.com/kubernetes/ingress-nginx). If you wish to reproduce the exact result in as depicted in this guide we recommend using the nginx-ingress-controller.
## Setting up Ingress
@@ -27,18 +38,13 @@ In order to use this a secret needs to be created containing the name of the `ht
Also, the applications provide external links to themselves in alerts and various places. When an ingress is used in front of the applications these links need to be based on the external URL's. This can be configured for each application in jsonnet.
```jsonnet
local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
local secret = k.core.v1.secret;
local ingress = k.extensions.v1beta1.ingress;
local ingressTls = ingress.mixin.spec.tlsType;
local ingressRule = ingress.mixin.spec.rulesType;
local httpIngressPath = ingressRule.mixin.http.pathsType;
local kp =
(import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/main.libsonnet') +
{
_config+:: {
namespace: 'monitoring',
values+:: {
common+: {
namespace: 'monitoring',
},
},
prometheus+:: {
prometheus+: {
@@ -48,44 +54,61 @@ local kp =
},
},
ingress+:: {
'prometheus-k8s':
ingress.new() +
ingress.mixin.metadata.withName($.prometheus.prometheus.metadata.name) +
ingress.mixin.metadata.withNamespace($.prometheus.prometheus.metadata.namespace) +
ingress.mixin.metadata.withAnnotations({
'nginx.ingress.kubernetes.io/auth-type': 'basic',
'nginx.ingress.kubernetes.io/auth-secret': 'basic-auth',
'nginx.ingress.kubernetes.io/auth-realm': 'Authentication Required',
}) +
ingress.mixin.spec.withRules(
ingressRule.new() +
ingressRule.withHost('prometheus.example.com') +
ingressRule.mixin.http.withPaths(
httpIngressPath.new() +
httpIngressPath.mixin.backend.withServiceName($.prometheus.service.metadata.name) +
httpIngressPath.mixin.backend.withServicePort('web')
),
),
'prometheus-k8s': {
apiVersion: 'networking.k8s.io/v1',
kind: 'Ingress',
metadata: {
name: $.prometheus.prometheus.metadata.name,
namespace: $.prometheus.prometheus.metadata.namespace,
annotations: {
'nginx.ingress.kubernetes.io/auth-type': 'basic',
'nginx.ingress.kubernetes.io/auth-secret': 'basic-auth',
'nginx.ingress.kubernetes.io/auth-realm': 'Authentication Required',
},
},
spec: {
rules: [{
host: 'prometheus.example.com',
http: {
paths: [{
backend: {
service: {
name: $.prometheus.service.metadata.name,
port: 'web',
},
},
}],
},
}],
},
},
} + {
ingress+:: {
'basic-auth-secret':
secret.new('basic-auth', { auth: std.base64(importstr 'auth') }) +
secret.mixin.metadata.withNamespace($._config.namespace),
'basic-auth-secret': {
apiVersion: 'v1',
kind: 'Secret',
metadata: {
name: 'basic-auth',
namespace: $._config.namespace,
},
data: { auth: std.base64(importstr 'auth') },
type: 'Opaque',
},
},
};
// Output a kubernetes List object with both ingresses (k8s-libsonnet)
k.core.v1.list.new([
kp.ingress['prometheus-k8s'],
kp.ingress['basic-auth-secret'],
])
```
In order to expose Alertmanager and Grafana, simply create additional fields containing an ingress object, but simply pointing at the `alertmanager` or `grafana` instead of the `prometheus-k8s` Service. Make sure to also use the correct port respectively, for Alertmanager it is also `web`, for Grafana it is `http`. Be sure to also specify the appropriate external URL. Note that the external URL for grafana is set in a different way than the external URL for Prometheus or Alertmanager. See [ingress.jsonnet](../examples/ingress.jsonnet) for how to set the Grafana external URL.
In order to expose Alertmanager and Grafana, simply create additional fields containing an ingress object, but simply pointing at the `alertmanager` or `grafana` instead of the `prometheus-k8s` Service. Make sure to also use the correct port respectively, for Alertmanager it is also `web`, for Grafana it is `http`. Be sure to also specify the appropriate external URL. Note that the external URL for grafana is set in a different way than the external URL for Prometheus or Alertmanager. See [ingress.jsonnet](https://github.com/prometheus-operator/kube-prometheus/tree/main/examples/ingress.jsonnet) for how to set the Grafana external URL.
In order to render the ingress objects similar to the other objects use as demonstrated in the [main readme](../README.md#usage):
In order to render the ingress objects similar to the other objects use as demonstrated in the [main readme](https://github.com/prometheus-operator/kube-prometheus/tree/main/README.md):
```
```jsonnet
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
@@ -98,4 +121,36 @@ In order to render the ingress objects similar to the other objects use as demon
Note, that in comparison only the last line was added, the rest is identical to the original.
See [ingress.jsonnet](../examples/ingress.jsonnet) for an example implementation.
See [ingress.jsonnet](https://github.com/prometheus-operator/kube-prometheus/tree/main/examples/ingress.jsonnet) for an example implementation.
## Adding Ingress namespace to NetworkPolicies
NetworkPolicies restricting access to the components are added by default. These can either be removed as in
[networkpolicies-disabled.jsonnet](https://github.com/prometheus-operator/kube-prometheus/tree/main/examples/networkpolicies-disabled.jsonnet) or modified as
described here.
This is an example for grafana, but the same can be applied to alertmanager and prometheus.
```jsonnet
{
alertmanager+:: {
networkPolicy+: {
spec+: {
ingress: [
super.ingress[0] + {
from+: [
{
namespaceSelector: {
matchLabels: {
'app.kubernetes.io/name': 'ingress-nginx',
},
},
},
],
},
] + super.ingress[1:],
},
},
},
}
```

View File

@@ -0,0 +1,81 @@
### Monitoring additional namespaces
In order to monitor additional namespaces, the Prometheus server requires the appropriate `Role` and `RoleBinding` to be able to discover targets from that namespace. By default the Prometheus server is limited to the three namespaces it requires: default, kube-system and the namespace you configure the stack to run in via `$.values.namespace`. This is specified in `$.values.prometheus.namespaces`, to add new namespaces to monitor, simply append the additional namespaces:
```jsonnet mdox-exec="cat examples/additional-namespaces.jsonnet"
local kp = (import 'kube-prometheus/main.libsonnet') + {
values+:: {
common+: {
namespace: 'monitoring',
},
prometheus+: {
namespaces+: ['my-namespace', 'my-second-namespace'],
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
#### Defining the ServiceMonitor for each additional Namespace
In order to Prometheus be able to discovery and scrape services inside the additional namespaces specified in previous step you need to define a ServiceMonitor resource.
> Typically it is up to the users of a namespace to provision the ServiceMonitor resource, but in case you want to generate it with the same tooling as the rest of the cluster monitoring infrastructure, this is a guide on how to achieve this.
You can define ServiceMonitor resources in your `jsonnet` spec. See the snippet bellow:
```jsonnet mdox-exec="cat examples/additional-namespaces-servicemonitor.jsonnet"
local kp = (import 'kube-prometheus/main.libsonnet') + {
values+:: {
common+: {
namespace: 'monitoring',
},
prometheus+:: {
namespaces+: ['my-namespace', 'my-second-namespace'],
},
},
exampleApplication: {
serviceMonitorMyNamespace: {
apiVersion: 'monitoring.coreos.com/v1',
kind: 'ServiceMonitor',
metadata: {
name: 'my-servicemonitor',
namespace: 'my-namespace',
},
spec: {
jobLabel: 'app',
endpoints: [
{
port: 'http-metrics',
},
],
selector: {
matchLabels: {
'app.kubernetes.io/name': 'myapp',
},
},
},
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } +
{ ['example-application-' + name]: kp.exampleApplication[name] for name in std.objectFields(kp.exampleApplication) }
```
> NOTE: make sure your service resources have the right labels (eg. `'app': 'myapp'`) applied. Prometheus uses kubernetes labels to discover resources inside the namespaces.

View File

@@ -0,0 +1,29 @@
### Monitoring all namespaces
In case you want to monitor all namespaces in a cluster, you can add the following mixin. Also, make sure to empty the namespaces defined in prometheus so that roleBindings are not created against them.
```jsonnet mdox-exec="cat examples/all-namespaces.jsonnet"
local kp = (import 'kube-prometheus/main.libsonnet') +
(import 'kube-prometheus/addons/all-namespaces.libsonnet') + {
values+:: {
common+: {
namespace: 'monitoring',
},
prometheus+: {
namespaces: [],
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
> NOTE: This configuration can potentially make your cluster insecure especially in a multi-tenant cluster. This is because this gives Prometheus visibility over the whole cluster which might not be expected in a scenario when certain namespaces are locked down for security reasons.
Proceed with [creating ServiceMonitors for the services in the namespaces](monitoring-additional-namespaces.md#defining-the-servicemonitor-for-each-additional-namespace) you actually want to monitor

View File

@@ -0,0 +1,8 @@
### NodePorts
Another mixin that may be useful for exploring the stack is to expose the UIs of Prometheus, Alertmanager and Grafana on NodePorts:
```jsonnet mdox-exec="cat examples/jsonnet-snippets/node-ports.jsonnet"
(import 'kube-prometheus/main.libsonnet') +
(import 'kube-prometheus/addons/node-ports.libsonnet')
```

View File

@@ -0,0 +1,25 @@
### Running kube-prometheus on specific platforms
A common example is that not all Kubernetes clusters are created exactly the same way, meaning the configuration to monitor them may be slightly different. For the following clusters there are mixins available to easily configure them:
* aws
* bootkube
* eks
* gke
* kops
* kops_coredns
* kubeadm
* kubespray
These mixins are selectable via the `platform` field of kubePrometheus:
```jsonnet mdox-exec="cat examples/jsonnet-snippets/platform.jsonnet"
(import 'kube-prometheus/main.libsonnet') +
{
values+:: {
common+: {
platform: 'example-platform',
},
},
}
```

View File

@@ -0,0 +1,23 @@
### Pod Anti-Affinity
To prevent `Prometheus` and `Alertmanager` instances from being deployed onto the same node when
possible, one can include the [kube-prometheus-anti-affinity.libsonnet](https://github.com/prometheus-operator/kube-prometheus/tree/main/jsonnet/kube-prometheus/addons/anti-affinity.libsonnet) mixin:
```jsonnet mdox-exec="cat examples/anti-affinity.jsonnet"
local kp = (import 'kube-prometheus/main.libsonnet') +
(import 'kube-prometheus/addons/anti-affinity.libsonnet') + {
values+:: {
common+: {
namespace: 'monitoring',
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```

View File

@@ -0,0 +1,61 @@
### Prometheus-agent mode
***ATTENTION***: Although it is possible to run Prometheus in Agent mode with Prometheus-Operator, it requires strategic merge patches. This practice is not recommended and we do not provide support if Prometheus doesn't work as you expect. **Try it at your own risk!**
```jsonnet mdox-exec="cat examples/prometheus-agent.jsonnet"
local kp =
(import 'kube-prometheus/main.libsonnet') +
{
values+:: {
common+: {
namespace: 'monitoring',
},
prometheus+: {
resources: {
requests: { memory: '100Mi' },
},
enableFeatures: ['agent'],
},
},
prometheus+: {
prometheus+: {
spec+: {
replicas: 1,
alerting:: {},
ruleSelector:: {},
remoteWrite: [{
url: 'http://remote-write-url.com',
}],
containers+: [
{
name: 'prometheus',
args+: [
'--config.file=/etc/prometheus/config_out/prometheus.env.yaml',
'--storage.agent.path=/prometheus',
'--enable-feature=agent',
'--web.enable-lifecycle',
],
},
],
},
},
},
};
{ 'setup/0namespace-namespace': kp.kubePrometheus.namespace } +
{
['setup/prometheus-operator-' + name]: kp.prometheusOperator[name]
for name in std.filter((function(name) name != 'serviceMonitor' && name != 'prometheusRule'), std.objectFields(kp.prometheusOperator))
} +
// serviceMonitor and prometheusRule are separated so that they can be created after the CRDs are ready
{ 'prometheus-operator-serviceMonitor': kp.prometheusOperator.serviceMonitor } +
{ 'prometheus-operator-prometheusRule': kp.prometheusOperator.prometheusRule } +
{ 'kube-prometheus-prometheusRule': kp.kubePrometheus.prometheusRule } +
{ ['blackbox-exporter-' + name]: kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['kubernetes-' + name]: kp.kubernetesControlPlane[name] for name in std.objectFields(kp.kubernetesControlPlane) }
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) }
```

View File

@@ -0,0 +1,66 @@
### Static etcd configuration
In order to configure a static etcd cluster to scrape there is a simple [static-etcd.libsonnet](https://github.com/prometheus-operator/kube-prometheus/tree/main/jsonnet/kube-prometheus/addons/static-etcd.libsonnet) mixin prepared.
An example of how to use it can be seen below:
```jsonnet mdox-exec="cat examples/etcd.jsonnet"
local kp = (import 'kube-prometheus/main.libsonnet') +
(import 'kube-prometheus/addons/static-etcd.libsonnet') + {
values+:: {
common+: {
namespace: 'monitoring',
},
etcd+: {
// Configure this to be the IP(s) to scrape - i.e. your etcd node(s) (use commas to separate multiple values).
ips: ['127.0.0.1'],
// Reference info:
// * https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#servicemonitorspec (has endpoints)
// * https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint (has tlsConfig)
// * https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#tlsconfig (has: caFile, certFile, keyFile, serverName, & insecureSkipVerify)
// Set these three variables to the fully qualified directory path on your work machine to the certificate files that are valid to scrape etcd metrics with (check the apiserver container).
// Most likely these certificates are generated somewhere in an infrastructure repository, so using the jsonnet `importstr` function can
// be useful here. (Kube-aws stores these three files inside the credential folder.)
// All the sensitive information on the certificates will end up in a Kubernetes Secret.
clientCA: importstr 'etcd-client-ca.crt',
clientKey: importstr 'etcd-client.key',
clientCert: importstr 'etcd-client.crt',
// Note that you should specify a value EITHER for 'serverName' OR for 'insecureSkipVerify'. (Don't specify a value for both of them, and don't specify a value for neither of them.)
// * Specifying serverName: Ideally you should provide a valid value for serverName (and then insecureSkipVerify should be left as false - so that serverName gets used).
// * Specifying insecureSkipVerify: insecureSkipVerify is only to be used (i.e. set to true) if you cannot (based on how your etcd certificates were created) use a Subject Alternative Name.
// * If you specify a value:
// ** for both of these variables: When 'insecureSkipVerify: true' is specified, then also specifying a value for serverName won't hurt anything but it will be ignored.
// ** for neither of these variables: then you'll get authentication errors on the prom '/targets' page with your etcd targets.
// A valid name (DNS or Subject Alternative Name) that the client (i.e. prometheus) will use to verify the etcd TLS certificate.
// * Note that doing `nslookup etcd.kube-system.svc.cluster.local` (on a pod in a K8s cluster where kube-prometheus has been installed) shows that kube-prometheus sets up this hostname.
// * `openssl x509 -noout -text -in etcd-client.pem` will print the Subject Alternative Names.
serverName: 'etcd.kube-system.svc.cluster.local',
// When insecureSkipVerify isn't specified, the default value is "false".
//insecureSkipVerify: true,
// In case you have generated the etcd certificate with kube-aws:
// * If you only have one etcd node, you can use the value from 'etcd.internalDomainName' (specified in your kube-aws cluster.yaml) as the value for 'serverName'.
// * But if you have multiple etcd nodes, you will need to use 'insecureSkipVerify: true' (if using default certificate generators method), as the valid certificate domain
// will be different for each etcd node. (kube-aws default certificates are not valid against the IP - they were created for the DNS.)
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
If you'd like to monitor an etcd instance that lives outside the cluster, see [Monitoring external etcd](../monitoring-external-etcd.md) for more information.
> Note that monitoring etcd in minikube is currently not possible because of how etcd is setup. (minikube's etcd binds to 127.0.0.1:2379 only, and within host networking namespace.)

View File

@@ -0,0 +1,23 @@
### Stripping container resource limits
Sometimes in small clusters, the CPU/memory limits can get high enough for alerts to be fired continuously. To prevent this, one can strip off the predefined limits.
To do that, one can import the following mixin
```jsonnet mdox-exec="cat examples/strip-limits.jsonnet"
local kp = (import 'kube-prometheus/main.libsonnet') +
(import 'kube-prometheus/addons/strip-limits.libsonnet') + {
values+:: {
common+: {
namespace: 'monitoring',
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```

View File

@@ -0,0 +1,39 @@
### Internal Registry
Some Kubernetes installations source all their images from an internal registry. kube-prometheus supports this use case and helps the user synchronize every image it uses to the internal registry and generate manifests pointing at the internal registry.
To produce the `docker pull/tag/push` commands that will synchronize upstream images to `internal-registry.com/organization` (after having run the `jb` command to populate the vendor directory):
```shell
$ jsonnet -J vendor -S --tla-str repository=internal-registry.com/organization examples/sync-to-internal-registry.jsonnet
$ docker pull k8s.gcr.io/addon-resizer:1.8.4
$ docker tag k8s.gcr.io/addon-resizer:1.8.4 internal-registry.com/organization/addon-resizer:1.8.4
$ docker push internal-registry.com/organization/addon-resizer:1.8.4
$ docker pull quay.io/prometheus/alertmanager:v0.16.2
$ docker tag quay.io/prometheus/alertmanager:v0.16.2 internal-registry.com/organization/alertmanager:v0.16.2
$ docker push internal-registry.com/organization/alertmanager:v0.16.2
...
```
The output of this command can be piped to a shell to be executed by appending `| sh`.
Then to generate manifests with `internal-registry.com/organization`, use the `withImageRepository` mixin:
```jsonnet mdox-exec="cat examples/internal-registry.jsonnet"
local mixin = import 'kube-prometheus/addons/config-mixins.libsonnet';
local kp = (import 'kube-prometheus/main.libsonnet') + {
values+:: {
common+: {
namespace: 'monitoring',
},
},
} + mixin.withImageRepository('internal-registry.com/organization');
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```

170
docs/customizing.md Normal file
View File

@@ -0,0 +1,170 @@
# Customizing Kube-Prometheus
This section:
* describes how to customize the kube-prometheus library via compiling the kube-prometheus manifests yourself (as an alternative to the [README.md quickstart section](../README.md#quickstart)).
* still doesn't require you to make a copy of this entire repository, but rather only a copy of a few select files.
## Installing
The content of this project consists of a set of [jsonnet](http://jsonnet.org/) files making up a library to be consumed.
Install this library in your own project with [jsonnet-bundler](https://github.com/jsonnet-bundler/jsonnet-bundler#install) (the jsonnet package manager):
```shell
$ mkdir my-kube-prometheus; cd my-kube-prometheus
$ jb init # Creates the initial/empty `jsonnetfile.json`
# Install the kube-prometheus dependency
$ jb install github.com/prometheus-operator/kube-prometheus/jsonnet/kube-prometheus@main # Creates `vendor/` & `jsonnetfile.lock.json`, and fills in `jsonnetfile.json`
$ wget https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/example.jsonnet -O example.jsonnet
$ wget https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/build.sh -O build.sh
$ chmod +x build.sh
```
> `jb` can be installed with `go install -a github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest`
> An e.g. of how to install a given version of this library: `jb install github.com/prometheus-operator/kube-prometheus/jsonnet/kube-prometheus@main`
In order to update the kube-prometheus dependency, simply use the jsonnet-bundler update functionality:
```shell
$ jb update
```
## Generating
e.g. of how to compile the manifests: `./build.sh example.jsonnet`
> before compiling, install `gojsontoyaml` tool with `go install github.com/brancz/gojsontoyaml@latest` and `jsonnet` with `go install github.com/google/go-jsonnet/cmd/jsonnet@latest`
Here's [example.jsonnet](../example.jsonnet):
> Note: some of the following components must be configured beforehand. See [configuration](#configuring) and [customization-examples](customizations).
```jsonnet mdox-exec="cat example.jsonnet"
local kp =
(import 'kube-prometheus/main.libsonnet') +
// Uncomment the following imports to enable its patches
// (import 'kube-prometheus/addons/anti-affinity.libsonnet') +
// (import 'kube-prometheus/addons/managed-cluster.libsonnet') +
// (import 'kube-prometheus/addons/node-ports.libsonnet') +
// (import 'kube-prometheus/addons/static-etcd.libsonnet') +
// (import 'kube-prometheus/addons/custom-metrics.libsonnet') +
// (import 'kube-prometheus/addons/external-metrics.libsonnet') +
// (import 'kube-prometheus/addons/pyrra.libsonnet') +
{
values+:: {
common+: {
namespace: 'monitoring',
},
},
};
{ 'setup/0namespace-namespace': kp.kubePrometheus.namespace } +
{
['setup/prometheus-operator-' + name]: kp.prometheusOperator[name]
for name in std.filter((function(name) name != 'serviceMonitor' && name != 'prometheusRule'), std.objectFields(kp.prometheusOperator))
} +
// { 'setup/pyrra-slo-CustomResourceDefinition': kp.pyrra.crd } +
// serviceMonitor and prometheusRule are separated so that they can be created after the CRDs are ready
{ 'prometheus-operator-serviceMonitor': kp.prometheusOperator.serviceMonitor } +
{ 'prometheus-operator-prometheusRule': kp.prometheusOperator.prometheusRule } +
{ 'kube-prometheus-prometheusRule': kp.kubePrometheus.prometheusRule } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['blackbox-exporter-' + name]: kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } +
// { ['pyrra-' + name]: kp.pyrra[name] for name in std.objectFields(kp.pyrra) if name != 'crd' } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['kubernetes-' + name]: kp.kubernetesControlPlane[name] for name in std.objectFields(kp.kubernetesControlPlane) }
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) }
```
And here's the [build.sh](../build.sh) script (which uses `vendor/` to render all manifests in a json structure of `{filename: manifest-content}`):
```sh mdox-exec="cat ./build.sh"
#!/usr/bin/env bash
# This script uses arg $1 (name of *.jsonnet file to use) to generate the manifests/*.yaml files.
set -e
set -x
# only exit with zero if all commands of the pipeline exit successfully
set -o pipefail
# Make sure to use project tooling
PATH="$(pwd)/tmp/bin:${PATH}"
# Make sure to start with a clean 'manifests' dir
rm -rf manifests
mkdir -p manifests/setup
# Calling gojsontoyaml is optional, but we would like to generate yaml, not json
jsonnet -J vendor -m manifests "${1-example.jsonnet}" | xargs -I{} sh -c 'cat {} | gojsontoyaml > {}.yaml' -- {}
# Make sure to remove json files
find manifests -type f ! -name '*.yaml' -delete
rm -f kustomization
```
> Note you need `jsonnet` (`go install github.com/google/go-jsonnet/cmd/jsonnet@latest`) and `gojsontoyaml` (`go install github.com/brancz/gojsontoyaml@latest`) installed to run `build.sh`. If you just want json output, not yaml, then you can skip the pipe and everything afterwards.
This script runs the jsonnet code, then reads each key of the generated json and uses that as the file name, and writes the value of that key to that file, and converts each json manifest to yaml.
## Configuring
Jsonnet has the concept of hidden fields. These are fields, that are not going to be rendered in a result. This is used to configure the kube-prometheus components in jsonnet. In the example jsonnet code of the above [Generating section](#generating), you can see an example of this, where the `namespace` is being configured to be `monitoring`. In order to not override the whole object, use the `+::` construct of jsonnet, to merge objects, this way you can override individual settings, but retain all other settings and defaults.
The available fields and their default values can be seen in [main.libsonnet](../jsonnet/kube-prometheus/main.libsonnet). Note that many of the fields get their default values from variables, and for example the version numbers are imported from [versions.json](../jsonnet/kube-prometheus/versions.json).
Configuration is mainly done in the `values` map. You can see this being used in the `example.jsonnet` to set the namespace to `monitoring`. This is done in the `common` field, which all other components take their default value from. See for example how Alertmanager is configured in `main.libsonnet`:
```
alertmanager: {
name: 'main',
// Use the namespace specified under values.common by default.
namespace: $.values.common.namespace,
version: $.values.common.versions.alertmanager,
image: $.values.common.images.alertmanager,
mixin+: { ruleLabels: $.values.common.ruleLabels },
},
```
The grafana definition is located in a different project (https://github.com/brancz/kubernetes-grafana ), but needed configuration can be customized from the same top level `values` field. For example to allow anonymous access to grafana, add the following `values` section:
```
grafana+:: {
config: { // http://docs.grafana.org/installation/configuration/
sections: {
"auth.anonymous": {enabled: true},
},
},
},
```
## Apply the kube-prometheus stack
The previous generation step has created a bunch of manifest files in the manifest/ folder.
Now simply use `kubectl` to install Prometheus and Grafana as per your configuration:
```shell
# Update the namespace and CRDs, and then wait for them to be available before creating the remaining resources
$ kubectl apply --server-side -f manifests/setup
$ kubectl apply -f manifests/
```
> Note that due to some CRD size we are using kubectl server-side apply feature which is generally available since
> kubernetes 1.22. If you are using previous kubernetes versions this feature may not be available and you would need to
> use `kubectl create` instead.
Alternatively, the resources in both folders can be applied with a single command
`kubectl apply --server-side -Rf manifests`, but it may be necessary to run the command multiple times for all components to
be created successfully.
Check the monitoring namespace (or the namespace you have specific in `namespace: `) and make sure the pods are running. Prometheus and Grafana should be up and running soon.
## Minikube Example
To use an easy to reproduce example, see [minikube.jsonnet](../examples/minikube.jsonnet), which uses the minikube setup as demonstrated in [Prerequisites](../README.md#prerequisites). Because we would like easy access to our Prometheus, Alertmanager and Grafana UIs, `minikube.jsonnet` exposes the services as NodePort type services.

16
docs/deploy-kind.md Normal file
View File

@@ -0,0 +1,16 @@
---
weight: 301
toc: true
title: Deploy to kind
menu:
docs:
parent: kube
lead: This guide will help you deploying kube-prometheus on Kubernetes kind.
images: []
draft: false
description: This guide will help you deploying kube-prometheus on Kubernetes kind.
---
Time to explain how!
Your chance of [**contributing**](https://github.com/prometheus-operator/kube-prometheus/blob/main/docs/deploy-kind.md)!

View File

@@ -1,343 +0,0 @@
# Developing Prometheus Rules and Grafana Dashboards
`kube-prometheus` ships with a set of default [Prometheus rules](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/) and [Grafana](http://grafana.com/) dashboards. At some point one might like to extend them, the purpose of this document is to explain how to do this.
All manifests of kube-prometheus are generated using [jsonnet](https://jsonnet.org/) and Prometheus rules and Grafana dashboards in specific follow the [Prometheus Monitoring Mixins proposal](https://docs.google.com/document/d/1A9xvzwqnFVSOZ5fD3blKODXfsat5fg6ZhnKu9LK3lB4/).
For both the Prometheus rules and the Grafana dashboards Kubernetes `ConfigMap`s are generated within kube-prometheus. In order to add additional rules and dashboards simply merge them onto the existing json objects. This document illustrates examples for rules as well as dashboards.
As a basis, all examples in this guide are based on the base example of the kube-prometheus [readme](../README.md):
[embedmd]:# (../example.jsonnet)
```jsonnet
local kp =
(import 'kube-prometheus/kube-prometheus.libsonnet') +
// Uncomment the following imports to enable its patches
// (import 'kube-prometheus/kube-prometheus-anti-affinity.libsonnet') +
// (import 'kube-prometheus/kube-prometheus-managed-cluster.libsonnet') +
// (import 'kube-prometheus/kube-prometheus-node-ports.libsonnet') +
// (import 'kube-prometheus/kube-prometheus-static-etcd.libsonnet') +
// (import 'kube-prometheus/kube-prometheus-thanos-sidecar.libsonnet') +
// (import 'kube-prometheus/kube-prometheus-custom-metrics.libsonnet') +
{
_config+:: {
namespace: 'monitoring',
},
};
{ ['setup/0namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{
['setup/prometheus-operator-' + name]: kp.prometheusOperator[name]
for name in std.filter((function(name) name != 'serviceMonitor'), std.objectFields(kp.prometheusOperator))
} +
// serviceMonitor is separated so that it can be created after the CRDs are ready
{ 'prometheus-operator-serviceMonitor': kp.prometheusOperator.serviceMonitor } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
## Prometheus rules
### Alerting rules
According to the [Prometheus Monitoring Mixins proposal](https://docs.google.com/document/d/1A9xvzwqnFVSOZ5fD3blKODXfsat5fg6ZhnKu9LK3lB4/) Prometheus alerting rules are under the key `prometheusAlerts` in the top level object, so in order to add an additional alerting rule, we can simply merge an extra rule into the existing object.
The format is exactly the Prometheus format, so there should be no changes necessary should you have existing rules that you want to include.
> Note that alerts can just as well be included into this file, using the jsonnet `import` function. In this example it is just inlined in order to demonstrate their use in a single file.
[embedmd]:# (../examples/prometheus-additional-alert-rule-example.jsonnet)
```jsonnet
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + {
_config+:: {
namespace: 'monitoring',
},
prometheusAlerts+:: {
groups+: [
{
name: 'example-group',
rules: [
{
alert: 'Watchdog',
expr: 'vector(1)',
labels: {
severity: 'none',
},
annotations: {
description: 'This is a Watchdog meant to ensure that the entire alerting pipeline is functional.',
},
},
],
},
],
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
### Recording rules
In order to add a recording rule, simply do the same with the `prometheusRules` field.
> Note that rules can just as well be included into this file, using the jsonnet `import` function. In this example it is just inlined in order to demonstrate their use in a single file.
[embedmd]:# (../examples/prometheus-additional-recording-rule-example.jsonnet)
```jsonnet
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + {
_config+:: {
namespace: 'monitoring',
},
prometheusRules+:: {
groups+: [
{
name: 'example-group',
rules: [
{
record: 'some_recording_rule_name',
expr: 'vector(1)',
},
],
},
],
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
### Pre-rendered rules
We acknowledge, that users may need to transition existing rules, and therefore allow an option to add additional pre-rendered rules. Luckily the yaml and json formats are very close so the yaml rules just need to be converted to json without any manual interaction needed. Just a tool to convert yaml to json is needed:
```
go get -u -v github.com/brancz/gojsontoyaml
```
And convert the existing rule file:
```
cat existingrule.yaml | gojsontoyaml -yamltojson > existingrule.json
```
Then import it in jsonnet:
[embedmd]:# (../examples/prometheus-additional-rendered-rule-example.jsonnet)
```jsonnet
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + {
_config+:: {
namespace: 'monitoring',
},
prometheusAlerts+:: {
groups+: (import 'existingrule.json').groups,
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
### Changing default rules
Along with adding additional rules, we give the user the option to filter or adjust the existing rules imported by `kube-prometheus/kube-prometheus.libsonnet`. The recording rules can be found in [kube-prometheus/rules](../jsonnet/kube-prometheus/rules) and [kubernetes-mixin/rules](https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/rules) while the alerting rules can be found in [kube-prometheus/alerts](../jsonnet/kube-prometheus/alerts) and [kubernetes-mixin/alerts](https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/alerts).
Knowing which rules to change, the user can now use functions from the [Jsonnet standard library](https://jsonnet.org/ref/stdlib.html) to make these changes. Below are examples of both a filter and an adjustment being made to the default rules. These changes can be assigned to a local variable and then added to the `local kp` object as seen in the examples above.
#### Filter
Here the alert `KubeStatefulSetReplicasMismatch` is being filtered out of the group `kubernetes-apps`. The default rule can be seen [here](https://github.com/kubernetes-monitoring/kubernetes-mixin/blob/master/alerts/apps_alerts.libsonnet).
```jsonnet
local filter = {
prometheusAlerts+:: {
groups: std.map(
function(group)
if group.name == 'kubernetes-apps' then
group {
rules: std.filter(function(rule)
rule.alert != "KubeStatefulSetReplicasMismatch",
group.rules
)
}
else
group,
super.groups
),
},
};
```
#### Adjustment
Here the expression for the alert used above is updated from its previous value. The default rule can be seen [here](https://github.com/kubernetes-monitoring/kubernetes-mixin/blob/master/alerts/apps_alerts.libsonnet).
```jsonnet
local update = {
prometheusAlerts+:: {
groups: std.map(
function(group)
if group.name == 'kubernetes-apps' then
group {
rules: std.map(
function(rule)
if rule.alert == "KubeStatefulSetReplicasMismatch" then
rule {
expr: "kube_statefulset_status_replicas_ready{job=\"kube-state-metrics\",statefulset!=\"vault\"} != kube_statefulset_status_replicas{job=\"kube-state-metrics\",statefulset!=\"vault\"}"
}
else
rule,
group.rules
)
}
else
group,
super.groups
),
},
};
```
Using the example from above about adding in pre-rendered rules, the new local variables can be added in as follows:
```jsonnet
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + filter + update + {
prometheusAlerts+:: (import 'existingrule.json'),
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
## Dashboards
Dashboards can either be added using jsonnet or simply a pre-rendered json dashboard.
### Jsonnet dashboard
We recommend using the [grafonnet](https://github.com/grafana/grafonnet-lib/) library for jsonnet, which gives you a simple DSL to generate Grafana dashboards. Following the [Prometheus Monitoring Mixins proposal](https://docs.google.com/document/d/1A9xvzwqnFVSOZ5fD3blKODXfsat5fg6ZhnKu9LK3lB4/) additional dashboards are added to the `grafanaDashboards` key, located in the top level object. To add new jsonnet dashboards, simply add one.
> Note that dashboards can just as well be included into this file, using the jsonnet `import` function. In this example it is just inlined in order to demonstrate their use in a single file.
[embedmd]:# (../examples/grafana-additional-jsonnet-dashboard-example.jsonnet)
```jsonnet
local grafana = import 'grafonnet/grafana.libsonnet';
local dashboard = grafana.dashboard;
local row = grafana.row;
local prometheus = grafana.prometheus;
local template = grafana.template;
local graphPanel = grafana.graphPanel;
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + {
_config+:: {
namespace: 'monitoring',
},
grafana+:: {
dashboards+:: {
'my-dashboard.json':
dashboard.new('My Dashboard')
.addTemplate(
{
current: {
text: 'Prometheus',
value: 'Prometheus',
},
hide: 0,
label: null,
name: 'datasource',
options: [],
query: 'prometheus',
refresh: 1,
regex: '',
type: 'datasource',
},
)
.addRow(
row.new()
.addPanel(graphPanel.new('My Panel', span=6, datasource='$datasource')
.addTarget(prometheus.target('vector(1)')))
),
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
### Pre-rendered Grafana dashboards
As jsonnet is a superset of json, the jsonnet `import` function can be used to include Grafana dashboard json blobs. In this example we are importing a [provided example dashboard](../examples/example-grafana-dashboard.json).
[embedmd]:# (../examples/grafana-additional-rendered-dashboard-example.jsonnet)
```jsonnet
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + {
_config+:: {
namespace: 'monitoring',
},
grafanaDashboards+:: { // monitoring-mixin compatibility
'my-dashboard.json': (import 'example-grafana-dashboard.json'),
},
grafana+:: {
dashboards+:: { // use this method to import your dashboards to Grafana
'my-dashboard.json': (import 'example-grafana-dashboard.json'),
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
In case you have lots of json dashboard exported out from grafana UI the above approach is going to take lots of time to improve performance we can use `rawDashboards` field and provide it's value as json string by using `importstr`
[embedmd]:# (../examples/grafana-additional-rendered-dashboard-example-2.jsonnet)
```jsonnet
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + {
_config+:: {
namespace: 'monitoring',
},
grafana+:: {
rawDashboards+:: {
'my-dashboard.json': (importstr 'example-grafana-dashboard.json'),
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```

View File

@@ -1,70 +1,60 @@
<br>
<div class="alert alert-info" role="alert">
<i class="fa fa-exclamation-triangle"></i><b> Note:</b> Starting with v0.12.0, Prometheus Operator requires use of Kubernetes v1.7.x and up.
</div>
---
weight: 302
toc: true
title: Deploy to kubeadm
menu:
docs:
parent: kube
lead: This guide will help you deploying kube-prometheus on Kubernetes kubeadm.
images: []
draft: false
description: This guide will help you deploying kube-prometheus on Kubernetes kubeadm.
---
# Kube Prometheus on Kubeadm
The [kubeadm](https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/) tool is linked by Kubernetes as the offical way to deploy and manage self-hosted clusters. kubeadm does a lot of heavy lifting by automatically configuring your Kubernetes cluster with some common options. This guide is intended to show you how to deploy Prometheus, Prometheus Operator and Kube Prometheus to get you started monitoring your cluster that was deployed with kubeadm.
The [kubeadm](https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/) tool is linked by Kubernetes as the offical way to deploy and manage self-hosted clusters. Kubeadm does a lot of heavy lifting by automatically configuring your Kubernetes cluster with some common options. This guide is intended to show you how to deploy Prometheus, Prometheus Operator and Kube Prometheus to get you started monitoring your cluster that was deployed with Kubeadm.
This guide assumes you have a basic understanding of how to use the functionality the Prometheus Operator implements. If you haven't yet, we recommend reading through the [getting started guide](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/getting-started.md) as well as the [alerting guide](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/alerting.md).
This guide assumes you have a basic understanding of how to use the functionality the Prometheus Operator implements. If you haven't yet, we recommend reading through the [getting started guide](https://github.com/coreos/prometheus-operator/blob/master/Documentation/user-guides/getting-started.md) as well as the [alerting guide](https://github.com/coreos/prometheus-operator/blob/master/Documentation/user-guides/alerting.md).
## Kubeadm Pre-requisites
## kubeadm Pre-requisites
This guide assumes you have some familiarity with `kubeadm` or at least have deployed a cluster using `kubeadm`. By default, `kubeadm` does not expose two of the services that we will be monitoring. Therefore, in order to get the most out of the `kube-prometheus` package, we need to make some quick tweaks to the Kubernetes cluster. Since we will be monitoring the `kube-controller-manager` and `kube-scheduler`, we must expose them to the cluster.
By default, `kubeadm` runs these pods on your master and bound to `127.0.0.1`. There are a couple of ways to change this. The recommended way to change these features is to use the [kubeadm config file](https://kubernetes.io/docs/reference/generated/kubeadm/#config-file). An example configuration file can be used:
```yaml
apiVersion: kubeadm.k8s.io/v1alpha1
kind: MasterConfiguration
api:
advertiseAddress: 192.168.1.173
bindPort: 6443
authorizationModes:
- Node
- RBAC
certificatesDir: /etc/kubernetes/pki
cloudProvider:
apiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterConfiguration
controlPlaneEndpoint: "192.168.1.173:6443"
apiServer:
extraArgs:
authorization-mode: "Node,RBAC"
controllerManager:
extraArgs:
bind-address: "0.0.0.0"
scheduler:
extraArgs:
bind-address: "0.0.0.0"
certificatesDir: "/etc/kubernetes/pki"
etcd:
dataDir: /var/lib/etcd
endpoints: null
imageRepository: gcr.io/google_containers
kubernetesVersion: v1.8.3
# one of local or external
local:
dataDir: "/var/lib/etcd"
kubernetesVersion: "v1.23.1"
networking:
dnsDomain: cluster.local
serviceSubnet: 10.96.0.0/12
nodeName: your-dev
tokenTTL: 24h0m0s
controllerManagerExtraArgs:
address: 0.0.0.0
schedulerExtraArgs:
address: 0.0.0.0
dnsDomain: "cluster.local"
serviceSubnet: "10.96.0.0/12"
imageRepository: "registry.k8s.io"
```
Notice the `schedulerExtraArgs` and `controllerManagerExtraArgs`. This exposes the `kube-controller-manager` and `kube-scheduler` services to the rest of the cluster. If you have kubernetes core components as pods in the kube-system namespace, ensure that the `kube-prometheus-exporter-kube-scheduler` and `kube-prometheus-exporter-kube-controller-manager` services' `spec.selector` values match those of pods.
Notice the `.scheduler.extraArgs` and `.controllerManager.extraArgs`. This exposes the `kube-controller-manager` and `kube-scheduler` services to the rest of the cluster. If you have kubernetes core components as pods in the kube-system namespace, ensure that the `kube-prometheus-exporter-kube-scheduler` and `kube-prometheus-exporter-kube-controller-manager` services' `spec.selector` values match those of pods.
In addition, we will be using `node-exporter` to monitor the `cAdvisor` service on all the nodes. This, however requires a change to the `kubelet` service on the master as well as all the nodes. According to the Kubernetes documentation
> The kubeadm deb package ships with configuration for how the kubelet should be run. Note that the `kubeadm` CLI command will never touch this drop-in file. This drop-in file belongs to the kubeadm deb/rpm package.
Again, we need to expose the `cadvisor` that is installed and managed by the `kubelet` daemon and allow webhook token authentication. To do so, we do the following on all the masters and nodes:
```bash
KUBEADM_SYSTEMD_CONF=/etc/systemd/system/kubelet.service.d/10-kubeadm.conf
sed -e "/cadvisor-port=0/d" -i "$KUBEADM_SYSTEMD_CONF"
if ! grep -q "authentication-token-webhook=true" "$KUBEADM_SYSTEMD_CONF"; then
sed -e "s/--authorization-mode=Webhook/--authentication-token-webhook=true --authorization-mode=Webhook/" -i "$KUBEADM_SYSTEMD_CONF"
fi
systemctl daemon-reload
systemctl restart kubelet
```
In previous versions of Kubernetes, we had to make a change to the `kubelet` setting with regard to `cAdvisor` monitoring on the control-plane as well as all the nodes. But this is **no longer required due to [the change of Kubernetes](https://github.com/kubernetes/kubernetes/issues/56523)**.
In case you already have a Kubernetes deployed with kubeadm, change the address kube-controller-manager and kube-scheduler listens in addition to previous kubelet change:
```
sed -e "s/- --address=127.0.0.1/- --address=0.0.0.0/" -i /etc/kubernetes/manifests/kube-controller-manager.yaml
sed -e "s/- --address=127.0.0.1/- --address=0.0.0.0/" -i /etc/kubernetes/manifests/kube-scheduler.yaml
sed -e "s/- --bind-address=127.0.0.1/- --bind-address=0.0.0.0/" -i /etc/kubernetes/manifests/kube-controller-manager.yaml
sed -e "s/- --bind-address=127.0.0.1/- --bind-address=0.0.0.0/" -i /etc/kubernetes/manifests/kube-scheduler.yaml
```
With these changes, your Kubernetes cluster is ready.
@@ -86,15 +76,14 @@ Once you complete this guide you will monitor the following:
* kube-scheduler
* kube-controller-manager
## Getting Up and Running Fast with Kube-Prometheus
To help get started more quickly with monitoring Kubernetes clusters, [kube-prometheus](https://github.com/coreos/kube-prometheus) was created. It is a collection of manifests including dashboards and alerting rules that can easily be deployed. It utilizes the Prometheus Operator and all the manifests demonstrated in this guide.
To help get started more quickly with monitoring Kubernetes clusters, [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus) was created. It is a collection of manifests including dashboards and alerting rules that can easily be deployed. It utilizes the Prometheus Operator and all the manifests demonstrated in this guide.
This section represent a quick installation and is not intended to teach you about all the components. The easiest way to get started is to clone this repository and use the `kube-prometheus` section of the code.
```
git clone https://github.com/coreos/kube-prometheus
git clone https://github.com/prometheus-operator/kube-prometheus
cd kube-prometheus/
```
@@ -144,7 +133,7 @@ kubectl apply -f manifests/prometheus/prometheus-k8s-roles.yaml
kubectl apply -f manifests/prometheus/prometheus-k8s-role-bindings.yaml
```
Finally, install the [Alertmanager](https://github.com/coreos/prometheus-operator/blob/master/Documentation/user-guides/alerting.md)
Finally, install the [Alertmanager](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/alerting.md)
```
kubectl --namespace="$NAMESPACE" apply -f manifests/alertmanager
@@ -156,4 +145,4 @@ Now you should have a working cluster. After all the pods are ready, you should
* Alertmanager UI on node port `30903`
* Grafana on node port `30902`
These can of course be changed via the Service definitions. It is recommended to look at the [Exposing Prometheus and Alert Manager](https://github.com/coreos/prometheus-operator/blob/master/Documentation/user-guides/exposing-prometheus-and-alertmanager.md) documentation for more detailed information on how to expose these services.
These can of course be changed via the Service definitions. It is recommended to look at the [Exposing Prometheus and Alert Manager](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/exposing-prometheus-and-alertmanager.md) documentation for more detailed information on how to expose these services.

View File

@@ -0,0 +1,296 @@
// Has the following customisations
// Custom alert manager config
// Ingresses for the alert manager, prometheus and grafana
// Grafana admin user password
// Custom prometheus rules
// Custom grafana dashboards
// Custom prometheus config - Data retention, memory, etc.
// Node exporter role and role binding so we can use a PSP for the node exporter
// External variables
// See https://jsonnet.org/learning/tutorial.html
local cluster_identifier = std.extVar('cluster_identifier');
local etcd_ip = std.extVar('etcd_ip');
local etcd_tls_ca = std.extVar('etcd_tls_ca');
local etcd_tls_cert = std.extVar('etcd_tls_cert');
local etcd_tls_key = std.extVar('etcd_tls_key');
local grafana_admin_password = std.extVar('grafana_admin_password');
local prometheus_data_retention_period = std.extVar('prometheus_data_retention_period');
local prometheus_request_memory = std.extVar('prometheus_request_memory');
// Derived variables
local alert_manager_host = 'alertmanager.' + cluster_identifier + '.myorg.local';
local grafana_host = 'grafana.' + cluster_identifier + '.myorg.local';
local prometheus_host = 'prometheus.' + cluster_identifier + '.myorg.local';
// Imports
local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
local ingress = k.extensions.v1beta1.ingress;
local ingressRule = ingress.mixin.spec.rulesType;
local ingressRuleHttpPath = ingressRule.mixin.http.pathsType;
local ingressTls = ingress.mixin.spec.tlsType;
local role = k.rbac.v1.role;
local roleBinding = k.rbac.v1.roleBinding;
local roleRulesType = k.rbac.v1.role.rulesType;
local kp =
(import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/kube-prometheus-kubeadm.libsonnet') +
(import 'kube-prometheus/kube-prometheus-static-etcd.libsonnet') +
{
_config+:: {
// Override namespace
namespace: 'monitoring',
// Override alert manager config
// See https://github.com/coreos/kube-prometheus/tree/master/examples/alertmanager-config-external.jsonnet
alertmanager+: {
config: importstr 'alertmanager.yaml',
},
// Override etcd config
// See https://github.com/coreos/kube-prometheus/blob/master/jsonnet/kube-prometheus/kube-prometheus-static-etcd.libsonnet
// See https://github.com/coreos/kube-prometheus/blob/master/examples/etcd-skip-verify.jsonnet
etcd+:: {
clientCA: etcd_tls_ca,
clientCert: etcd_tls_cert,
clientKey: etcd_tls_key,
ips: [etcd_ip],
},
// Override grafana config
// anonymous access
// See http://docs.grafana.org/installation/configuration/
// See http://docs.grafana.org/auth/overview/#anonymous-authentication
// admin_password
// See http://docs.grafana.org/installation/configuration/#admin-password
grafana+:: {
config: {
sections: {
'auth.anonymous': {
enabled: true,
},
security: {
admin_password: grafana_admin_password,
},
},
},
},
},
// Additional grafana dashboards
grafanaDashboards+:: {
'my-specific.json': (import 'my-grafana-dashboard-definitions.json'),
},
// Alert manager needs an externalUrl
alertmanager+:: {
alertmanager+: {
spec+: {
// See https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md
// See https://github.com/coreos/prometheus-operator/blob/master/Documentation/user-guides/exposing-prometheus-and-alertmanager.md
externalUrl: 'https://' + alert_manager_host,
},
},
},
// Add additional ingresses
// See https://github.com/coreos/kube-prometheus/tree/master/examples/ingress.jsonnet
ingress+:: {
alertmanager:
ingress.new() +
ingress.mixin.metadata.withName('alertmanager') +
ingress.mixin.metadata.withNamespace($._config.namespace) +
ingress.mixin.metadata.withAnnotations({
'kubernetes.io/ingress.class': 'nginx-api',
}) +
ingress.mixin.spec.withRules(
ingressRule.new() +
ingressRule.withHost(alert_manager_host) +
ingressRule.mixin.http.withPaths(
ingressRuleHttpPath.new() +
ingressRuleHttpPath.mixin.backend.withServiceName('alertmanager-operated') +
ingressRuleHttpPath.mixin.backend.withServicePort(9093)
),
) +
// Note we do not need a TLS secretName here as we are going to use the nginx-ingress default secret which is a wildcard
// secretName would need to be in the same namespace at this time, see https://github.com/kubernetes/ingress-nginx/issues/2371
ingress.mixin.spec.withTls(
ingressTls.new() +
ingressTls.withHosts(alert_manager_host)
),
grafana:
ingress.new() +
ingress.mixin.metadata.withName('grafana') +
ingress.mixin.metadata.withNamespace($._config.namespace) +
ingress.mixin.metadata.withAnnotations({
'kubernetes.io/ingress.class': 'nginx-api',
}) +
ingress.mixin.spec.withRules(
ingressRule.new() +
ingressRule.withHost(grafana_host) +
ingressRule.mixin.http.withPaths(
ingressRuleHttpPath.new() +
ingressRuleHttpPath.mixin.backend.withServiceName('grafana') +
ingressRuleHttpPath.mixin.backend.withServicePort(3000)
),
) +
// Note we do not need a TLS secretName here as we are going to use the nginx-ingress default secret which is a wildcard
// secretName would need to be in the same namespace at this time, see https://github.com/kubernetes/ingress-nginx/issues/2371
ingress.mixin.spec.withTls(
ingressTls.new() +
ingressTls.withHosts(grafana_host)
),
prometheus:
ingress.new() +
ingress.mixin.metadata.withName('prometheus') +
ingress.mixin.metadata.withNamespace($._config.namespace) +
ingress.mixin.metadata.withAnnotations({
'kubernetes.io/ingress.class': 'nginx-api',
}) +
ingress.mixin.spec.withRules(
ingressRule.new() +
ingressRule.withHost(prometheus_host) +
ingressRule.mixin.http.withPaths(
ingressRuleHttpPath.new() +
ingressRuleHttpPath.mixin.backend.withServiceName('prometheus-operated') +
ingressRuleHttpPath.mixin.backend.withServicePort(9090)
),
) +
// Note we do not need a TLS secretName here as we are going to use the nginx-ingress default secret which is a wildcard
// secretName would need to be in the same namespace at this time, see https://github.com/kubernetes/ingress-nginx/issues/2371
ingress.mixin.spec.withTls(
ingressTls.new() +
ingressTls.withHosts(prometheus_host)
),
},
// Node exporter PSP role and role binding
// Add a new top level field for this, the "node-exporter" PSP already exists, so not defining here just referencing
// See https://github.com/coreos/prometheus-operator/issues/787
nodeExporterPSP: {
role:
role.new() +
role.mixin.metadata.withName('node-exporter-psp') +
role.mixin.metadata.withNamespace($._config.namespace) +
role.withRules([
roleRulesType.new() +
roleRulesType.withApiGroups(['policy']) +
roleRulesType.withResources(['podsecuritypolicies']) +
roleRulesType.withVerbs(['use']) +
roleRulesType.withResourceNames(['node-exporter']),
]),
roleBinding:
roleBinding.new() +
roleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') +
roleBinding.mixin.metadata.withName('node-exporter-psp') +
roleBinding.mixin.metadata.withNamespace($._config.namespace) +
roleBinding.mixin.roleRef.withName('node-exporter-psp') +
roleBinding.mixin.roleRef.mixinInstance({ kind: 'Role' }) +
roleBinding.withSubjects([{ kind: 'ServiceAccount', name: 'node-exporter' }]),
},
// Prometheus needs some extra custom config
prometheus+:: {
prometheus+: {
spec+: {
// See https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec
externalLabels: {
cluster: cluster_identifier,
},
// See https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md
// See https://github.com/coreos/prometheus-operator/blob/master/Documentation/user-guides/exposing-prometheus-and-alertmanager.md
externalUrl: 'https://' + prometheus_host,
// Override reuest memory
resources: {
requests: {
memory: prometheus_request_memory,
},
},
// Override data retention period
retention: prometheus_data_retention_period,
},
},
},
// Additional prometheus rules
// See https://github.com/coreos/kube-prometheus/docs/developing-prometheus-rules-and-grafana-dashboards.md
// cat my-prometheus-rules.yaml | gojsontoyaml -yamltojson | jq . > my-prometheus-rules.json
prometheusRules+:: {
groups+: import 'my-prometheus-rules.json',
},
};
// Render
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ [name + '-ingress']: kp.ingress[name] for name in std.objectFields(kp.ingress) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['node-exporter-psp-' + name]: kp.nodeExporterPSP[name] for name in std.objectFields(kp.nodeExporterPSP) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) }

View File

@@ -0,0 +1,316 @@
// Has the following customisations
// Custom alert manager config
// Ingresses for the alert manager, prometheus and grafana
// Grafana admin user password
// Custom prometheus rules
// Custom grafana dashboards
// Custom prometheus config - Data retention, memory, etc.
// Node exporter role and role binding so we can use a PSP for the node exporter
// for help with expected content, see https://github.com/thaum-xyz/ankhmorpork
// External variables
// See https://jsonnet.org/learning/tutorial.html
local cluster_identifier = std.extVar('cluster_identifier');
local etcd_ip = std.extVar('etcd_ip');
local etcd_tls_ca = std.extVar('etcd_tls_ca');
local etcd_tls_cert = std.extVar('etcd_tls_cert');
local etcd_tls_key = std.extVar('etcd_tls_key');
local grafana_admin_password = std.extVar('grafana_admin_password');
local prometheus_data_retention_period = std.extVar('prometheus_data_retention_period');
local prometheus_request_memory = std.extVar('prometheus_request_memory');
// Derived variables
local alert_manager_host = 'alertmanager.' + cluster_identifier + '.myorg.local';
local grafana_host = 'grafana.' + cluster_identifier + '.myorg.local';
local prometheus_host = 'prometheus.' + cluster_identifier + '.myorg.local';
// ksonnet no longer required
local kp =
(import 'kube-prometheus/main.libsonnet') +
// kubeadm now achieved by setting platform value - see 9 lines below
(import 'kube-prometheus/addons/static-etcd.libsonnet') +
(import 'kube-prometheus/addons/podsecuritypolicies.libsonnet') +
{
values+:: {
common+: {
namespace: 'monitoring',
},
// Add kubeadm platform-specific items,
// including kube-contoller-manager and kube-scheduler discovery
kubePrometheus+: {
platform: 'kubeadm',
},
// Override alert manager config
// See https://github.com/prometheus-operator/kube-prometheus/blob/main/examples/alertmanager-config-external.jsonnet
alertmanager+: {
config: importstr 'alertmanager.yaml',
},
// Override etcd config
// See https://github.com/prometheus-operator/kube-prometheus/blob/main/jsonnet/kube-prometheus/addons/static-etcd.libsonnet
// See https://github.com/prometheus-operator/kube-prometheus/blob/main/examples/etcd-skip-verify.jsonnet
etcd+:: {
clientCA: etcd_tls_ca,
clientCert: etcd_tls_cert,
clientKey: etcd_tls_key,
ips: [etcd_ip],
},
// Override grafana config
// anonymous access
// See http://docs.grafana.org/installation/configuration/
// See http://docs.grafana.org/auth/overview/#anonymous-authentication
// admin_password
// See http://docs.grafana.org/installation/configuration/#admin-password
grafana+:: {
config: {
sections: {
'auth.anonymous': {
enabled: true,
},
security: {
admin_password: grafana_admin_password,
},
},
},
// Additional grafana dashboards
dashboards+:: {
'my-specific.json': (import 'my-grafana-dashboard-definitions.json'),
},
},
},
// Alert manager needs an externalUrl
alertmanager+:: {
alertmanager+: {
spec+: {
// See https://github.com/prometheus-operator/kube-prometheus/blob/main/docs/exposing-prometheus-alertmanager-grafana-ingress.md
externalUrl: 'https://' + alert_manager_host,
},
},
},
// Add additional ingresses
// See https://github.com/prometheus-operator/kube-prometheus/blob/main/examples/ingress.jsonnet
ingress+:: {
alertmanager: {
apiVersion: 'networking.k8s.io/v1',
kind: 'Ingress',
metadata: {
name: 'alertmanager',
namespace: $.values.common.namespace,
annotations: {
'kubernetes.io/ingress.class': 'nginx-api',
},
},
spec: {
rules: [{
host: alert_manager_host,
http: {
paths: [{
path: '/',
pathType: 'Prefix',
backend: {
service: {
name: 'alertmanager-operated',
port: {
number: 9093,
},
},
},
}],
},
}],
tls: [{
hosts: [alert_manager_host],
}],
},
},
grafana: {
apiVersion: 'networking.k8s.io/v1',
kind: 'Ingress',
metadata: {
name: 'grafana',
namespace: $.values.common.namespace,
annotations: {
'kubernetes.io/ingress.class': 'nginx-api',
},
},
spec: {
rules: [{
host: grafana_host,
http: {
paths: [{
path: '/',
pathType: 'Prefix',
backend: {
service: {
name: 'grafana',
port: {
number: 3000,
},
},
},
}],
},
}],
tls: [{
hosts: [grafana_host],
}],
},
},
prometheus: {
apiVersion: 'networking.k8s.io/v1',
kind: 'Ingress',
metadata: {
name: 'prometheus',
namespace: $.values.common.namespace,
annotations: {
'kubernetes.io/ingress.class': 'nginx-api',
},
},
spec: {
rules: [{
host: prometheus_host,
http: {
paths: [{
path: '/',
pathType: 'Prefix',
backend: {
service: {
name: 'prometheus-operated',
port: {
number: 9090,
},
},
},
}],
},
}],
tls: [{
hosts: [prometheus_host],
}],
},
},
},
// Node exporter PSP role and role binding
nodeExporter+: {
'psp-role'+: {
apiVersion: 'rbac.authorization.k8s.io/v1',
kind: 'Role',
metadata: {
name: 'node-exporter-psp',
namespace: $.values.common.namespace,
},
rules: [{
apiGroups: ['policy'],
resources: ['podsecuritypolicies'],
verbs: ['use'],
resourceNames: ['node-exporter'],
}],
},
'psp-rolebinding'+: {
apiVersion: 'rbac.authorization.k8s.io/v1',
kind: 'RoleBinding',
metadata: {
name: 'node-exporter-psp',
namespace: $.values.common.namespace,
},
roleRef: {
apiGroup: 'rbac.authorization.k8s.io',
name: 'node-exporter-psp',
kind: 'Role',
},
subjects: [{
kind: 'ServiceAccount',
name: 'node-exporter',
}],
},
},
// Prometheus needs some extra custom config
prometheus+:: {
prometheus+: {
spec+: {
externalLabels: {
cluster: cluster_identifier,
},
// See https://github.com/prometheus-operator/kube-prometheus/blob/main/docs/exposing-prometheus-alertmanager-grafana-ingress.md
externalUrl: 'https://' + prometheus_host,
// Override reuest memory
resources: {
requests: {
memory: prometheus_request_memory,
},
},
// Override data retention period
retention: prometheus_data_retention_period,
},
},
},
// Additional prometheus rules
// See https://github.com/prometheus-operator/kube-prometheus/blob/main/docs/developing-prometheus-rules-and-grafana-dashboards.md#pre-rendered-rules
// cat my-prometheus-rules.yaml | gojsontoyaml -yamltojson | jq . > my-prometheus-rules.json
prometheusMe: {
rules: {
apiVersion: 'monitoring.coreos.com/v1',
kind: 'PrometheusRule',
metadata: {
name: 'my-prometheus-rule',
namespace: $.values.common.namespace,
labels: {
'app.kubernetes.io/name': 'kube-prometheus',
'app.kubernetes.io/part-of': 'kube-prometheus',
prometheus: 'k8s',
role: 'alert-rules',
},
},
spec: {
groups: import 'my-prometheus-rules.json',
},
},
},
};
// Render
{ 'setup/0namespace-namespace': kp.kubePrometheus.namespace } +
{
['setup/prometheus-operator-' + name]: kp.prometheusOperator[name]
for name in std.filter((function(name) name != 'serviceMonitor' && name != 'prometheusRule'), std.objectFields(kp.prometheusOperator))
} +
// serviceMonitor and prometheusRule are separated so that they can be created after the CRDs are ready
{ 'prometheus-operator-serviceMonitor': kp.prometheusOperator.serviceMonitor } +
{ 'prometheus-operator-prometheusRule': kp.prometheusOperator.prometheusRule } +
{ 'kube-prometheus-prometheusRule': kp.kubePrometheus.prometheusRule } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['blackbox-exporter-' + name]: kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['kubernetes-' + name]: kp.kubernetesControlPlane[name] for name in std.objectFields(kp.kubernetesControlPlane) }
{ [name + '-ingress']: kp.ingress[name] for name in std.objectFields(kp.ingress) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) }
+ { ['prometheus-my-' + name]: kp.prometheusMe[name] for name in std.objectFields(kp.prometheusMe) }

View File

@@ -0,0 +1,251 @@
## Example of conversion of a legacy my.jsonnet file
An example conversion of a legacy custom jsonnet file to release-0.8
format can be seen by viewing and comparing this
[release-0.3 jsonnet file](my.release-0.3.jsonnet) (when the github
repo was under `https://github.com/coreos/kube-prometheus...`)
and the corresponding [release-0.8 jsonnet file](my.release-0.8.jsonnet).
These two files have had necessary blank lines added so that they
can be compared side-by-side and line-by-line on screen.
The conversion covers both the change of stopping using ksonnet after
release-0.3 and also the major migration after release-0.7 as described in
[migration-guide.md](../migration-guide.md)
The sample files are intended as an example of format conversion and
not necessarily best practice for the files in release-0.3 or release-0.8.
Below are three sample extracts of the conversion as an indication of the
changes required.
<table>
<tr>
<th> release-0.3 </th>
<th> release-0.8 </th>
</tr>
<tr>
<td>
```jsonnet
local kp =
(import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/kube-prometheus-kubeadm.libsonnet') +
(import 'kube-prometheus/kube-prometheus-static-etcd.libsonnet') +
{
_config+:: {
// Override namespace
namespace: 'monitoring',
```
</td>
<td>
```jsonnet
local kp =
(import 'kube-prometheus/main.libsonnet') +
// kubeadm now achieved by setting platform value - see 9 lines below
(import 'kube-prometheus/addons/static-etcd.libsonnet') +
(import 'kube-prometheus/addons/podsecuritypolicies.libsonnet') +
{
values+:: {
common+: {
namespace: 'monitoring',
},
// Add kubeadm platform-specific items,
// including kube-contoller-manager and kube-scheduler discovery
kubePrometheus+: {
platform: 'kubeadm',
},
```
</td>
</tr>
</table>
<table>
<tr>
<th> release-0.3 </th>
<th> release-0.8 </th>
</tr>
<tr>
<td>
```jsonnet
// Add additional ingresses
// See https://github.com/coreos/kube-prometheus/...
// tree/master/examples/ingress.jsonnet
ingress+:: {
alertmanager:
ingress.new() +
ingress.mixin.metadata.withName('alertmanager') +
ingress.mixin.metadata.withNamespace($._config.namespace) +
ingress.mixin.metadata.withAnnotations({
'kubernetes.io/ingress.class': 'nginx-api',
}) +
ingress.mixin.spec.withRules(
ingressRule.new() +
ingressRule.withHost(alert_manager_host) +
ingressRule.mixin.http.withPaths(
ingressRuleHttpPath.new() +
ingressRuleHttpPath.mixin.backend
.withServiceName('alertmanager-operated') +
ingressRuleHttpPath.mixin.backend.withServicePort(9093)
),
) +
// Note we do not need a TLS secretName here as we are going to use the
// nginx-ingress default secret which is a wildcard
// secretName would need to be in the same namespace at this time,
// see https://github.com/kubernetes/ingress-nginx/issues/2371
ingress.mixin.spec.withTls(
ingressTls.new() +
ingressTls.withHosts(alert_manager_host)
),
```
</td>
<td>
```jsonnet
// Add additional ingresses
// See https://github.com/prometheus-operator/kube-prometheus/...
// blob/main/examples/ingress.jsonnet
ingress+:: {
alertmanager: {
apiVersion: 'networking.k8s.io/v1',
kind: 'Ingress',
metadata: {
name: 'alertmanager',
namespace: $.values.common.namespace,
annotations: {
'kubernetes.io/ingress.class': 'nginx-api',
},
},
spec: {
rules: [{
host: alert_manager_host,
http: {
paths: [{
path: '/',
pathType: 'Prefix',
backend: {
service: {
name: 'alertmanager-operated',
port: {
number: 9093,
},
},
},
}],
},
}],
tls: [{
hosts: [alert_manager_host],
}],
},
},
```
</td>
</tr>
</table>
<table>
<tr>
<th> release-0.3 </th>
<th> release-0.8 </th>
</tr>
<tr>
<td>
```jsonnet
// Additional prometheus rules
// See https://github.com/coreos/kube-prometheus/docs/...
// developing-prometheus-rules-and-grafana-dashboards.md
//
// cat my-prometheus-rules.yaml | \
// gojsontoyaml -yamltojson | \
// jq . > my-prometheus-rules.json
prometheusRules+:: {
groups+: import 'my-prometheus-rules.json',
},
};
```
</td>
<td>
```jsonnet
// Additional prometheus rules
// See https://github.com/prometheus-operator/kube-prometheus/blob/main/...
// docs/developing-prometheus-rules-and-grafana-dashboards.md...
// #pre-rendered-rules
// cat my-prometheus-rules.yaml | \
// gojsontoyaml -yamltojson | \
// jq . > my-prometheus-rules.json
prometheusMe: {
rules: {
apiVersion: 'monitoring.coreos.com/v1',
kind: 'PrometheusRule',
metadata: {
name: 'my-prometheus-rule',
namespace: $.values.common.namespace,
labels: {
'app.kubernetes.io/name': 'kube-prometheus',
'app.kubernetes.io/part-of': 'kube-prometheus',
prometheus: 'k8s',
role: 'alert-rules',
},
},
spec: {
groups: import 'my-prometheus-rules.json',
},
},
},
};
...
+ { ['prometheus-my-' + name]: kp.prometheusMe[name] for name in std.objectFields(kp.prometheusMe) }
```
</td>
</tr>
</table>

76
docs/migration-guide.md Normal file
View File

@@ -0,0 +1,76 @@
# Migration guide from release-0.7 and earlier
## Why?
Thanks to our community we identified a lot of short-commings of previous design, varying from issues with global state to UX problems. Hoping to fix at least part of those issues we decided to do a complete refactor of the codebase.
## Overview
### Breaking Changes
- global `_config` object is removed and the new `values` object is a partial replacement
- `imageRepos` field was removed and the project no longer tries to compose image strings. Use `$.values.common.images` to override default images.
- prometheus alerting and recording rules are split into multiple `PrometheusRule` objects
- kubernetes control plane ServiceMonitors and Services are now part of the new `kubernetesControlPlane` top-level object instead of `prometheus` object
- `jsonnet/kube-prometheus/kube-prometheus.libsonnet` file was renamed to `jsonnet/kube-prometheus/main.libsonnet` and slimmed down to bare minimum
- `jsonnet/kube-prometheus/kube-prometheus*-.libsonnet` files were move either to `jsonnet/kube-prometheus/addons/` or `jsonnet/kube-prometheus/platforms/` depending on the feature they provided
- all component libraries are now function- and not object-based
- monitoring-mixins are included inside each component and not globally. `prometheusRules`, `prometheusAlerts`, and `grafanaDashboards` are accessible only per component via `mixin` object (ex. `$.alertmanager.mixin.prometheusAlerts`)
- default repository branch changed from `master` to `main`
- labels on resources have changes, `kubectl apply` will not work correctly due to those field being immutable. Deleting the resource first before applying is a workaround if you are using the kubectl CLI. (This only applies to `Deployments` and `DaemonSets`.)
### New Features
- concept of `addons`, `components`, and `platforms` was introduced
- all main `components` are now represented internally by a function with default values and required parameters (see #Component-configuration for more information)
- `$.values` holds main configuration parameters and should be used to set basic stack configuration.
- common parameters across all `components` are stored now in `$.values.common`
- removed dependency on deprecated ksonnet library
## Details
### Components, Addons, Platforms
Those concepts were already present in the repository but it wasn't clear which file is holding what. After refactoring we categorized jsonnet code into 3 buckets and put them into separate directories:
- `components` - main building blocks for kube-prometheus, written as functions responsible for creating multiple objects representing kubernetes manifests. For example all objects for node_exporter deployment are bundled in `components/node_exporter.libsonnet` library
- `addons` - everything that can enhance kube-prometheus deployment. Those are small snippets of code adding a small feature, for example adding anti-affinity to pods via [`addons/anti-affinity.libsonnet`](https://github.com/prometheus-operator/kube-prometheus/blob/main/jsonnet/kube-prometheus/addons/anti-affinity.libsonnet). Addons are meant to be used in object-oriented way like `local kp = (import 'kube-prometheus/main.libsonnet') + (import 'kube-prometheus/addons/all-namespaces.libsonnet')`
- `platforms` - currently those are `addons` specialized to allow deploying kube-prometheus project on a specific platform.
### Component configuration
Refactoring main components to use functions allowed us to define APIs for said components. Each function has a default set of parameters that can be overridden or that are required to be set by a user. Those default parameters are represented in each component by `defaults` map at the top of each library file, for example in [`node_exporter.libsonnet`](https://github.com/prometheus-operator/kube-prometheus/blob/1d2a0e275af97948667777739a18b24464480dc8/jsonnet/kube-prometheus/components/node-exporter.libsonnet#L3-L34).
This API is meant to ease the use of kube-prometheus as parameters can be passed from a JSON file and don't need to be in jsonnet format. However, if you need to modify particular parts of the stack, jsonnet allows you to do this and we are also not restricting such access in any way. An example of such modifications can be seen in any of our `addons`, like the [`addons/anti-affinity.libsonnet`](https://github.com/prometheus-operator/kube-prometheus/blob/main/jsonnet/kube-prometheus/addons/anti-affinity.libsonnet) one.
### Mixin integration
Previously kube-prometheus project joined all mixins on a global level. However with a wider adoption of monitoring mixins this turned out to be a problem, especially apparent when two mixins started to use the same configuration field for different purposes. To fix this we moved all mixins into their own respective components:
- alertmanager mixin -> `alertmanager.libsonnet`
- kubernetes mixin -> `k8s-control-plane.libsonnet`
- kube-state-metrics mixin -> `kube-state-metrics.libsonnet`
- node_exporter mixin -> `node_exporter.libsonnet`
- prometheus and thanos sidecar mixins -> `prometheus.libsonnet`
- prometheus-operator mixin -> `prometheus-operator.libsonnet`
- kube-prometheus alerts and rules -> `components/mixin/custom.libsonnet`
> etcd mixin is a special case as we add it inside an `addon` in `addons/static-etcd.libsonnet`
This results in creating multiple `PrometheusRule` objects instead of having one giant object as before. It also means each mixin is configured separately and accessing mixin objects is done via `$.<component>.mixin`.
## Examples
All examples from `examples/` directory were adapted to the new codebase. [Please take a look at them for guideance](https://github.com/prometheus-operator/kube-prometheus/tree/main/examples)
## Legacy migration
An example of conversion of a legacy release-0.3 my.jsonnet file to release-0.8 can be found in [migration-example](migration-example)
## Advanced usage examples
For more advanced usage examples you can take a look at those two, open to public, implementations:
- [thaum-xyz/ankhmorpork](https://github.com/thaum-xyz/ankhmorpork/blob/master/apps/monitoring/jsonnet) - extending kube-prometheus to adapt to a required environment
- [openshift/cluster-monitoring-operator](https://github.com/openshift/cluster-monitoring-operator/pull/1044) - using kube-prometheus components as standalone libraries to build a custom solution
## Final note
Refactoring was a huge undertaking and possibly this document didn't describe in enough detail how to help you with migration to the new stack. If that is the case, please reach out to us by using [GitHub discussions](https://github.com/prometheus-operator/kube-prometheus/discussions) feature or directly on [#prometheus-operator kubernetes slack channel](http://slack.k8s.io/).

View File

@@ -1,10 +1,22 @@
# Monitoring external etcd
This guide will help you monitor an external etcd cluster. When the etcd cluster is not hosted inside Kubernetes.
---
weight: 305
toc: true
title: Monitoring external etcd
menu:
docs:
parent: kube
lead: This guide will help you monitoring an external etcd cluster.
images: []
draft: false
description: This guide will help you monitoring an external etcd cluster.
---
When the etcd cluster is not hosted inside Kubernetes.
This is often the case with Kubernetes setups. This approach has been tested with kube-aws but the same principals apply to other tools.
Note that [etcd.jsonnet](../examples/etcd.jsonnet) & [kube-prometheus-static-etcd.libsonnet](../jsonnet/kube-prometheus/kube-prometheus-static-etcd.libsonnet) (which are described by a section of the [Readme](../README.md#static-etcd-configuration)) do the following:
* Put the three etcd TLS client files (CA & cert & key) into a secret in the namespace, and have Prometheus Operator load the secret.
* Create the following (to expose etcd metrics - port 2379): a Service, Endpoint, & ServiceMonitor.
Note that [etcd.jsonnet](../examples/etcd.jsonnet) & [static-etcd.libsonnet](../jsonnet/kube-prometheus/addons/static-etcd.libsonnet) (which are described by a section of the [customization](customizations/static-etcd-configuration.md)) do the following:
* Put the three etcd TLS client files (CA & cert & key) into a secret in the namespace, and have Prometheus Operator load the secret.
* Create the following (to expose etcd metrics - port 2379): a Service, Endpoint, & ServiceMonitor.
# Step 1: Open the port
@@ -13,6 +25,7 @@ You now need to allow the nodes Prometheus are running on to talk to the etcd on
If using kube-aws, you will need to edit the etcd security group inbound, specifying the security group of your Kubernetes node (worker) as the source.
## kube-aws and EIP or ENI inconsistency
With kube-aws, each etcd node has two IP addresses:
* EC2 instance IP
@@ -27,6 +40,7 @@ Another idea woud be to use the DNS entries of etcd, but those are not currently
# Step 2: verify
Go to the Prometheus UI on :9090/config and check that you have an etcd job entry:
```
- job_name: monitoring/etcd-k8s/0
scrape_interval: 30s
@@ -35,6 +49,5 @@ Go to the Prometheus UI on :9090/config and check that you have an etcd job entr
```
On the :9090/targets page:
* You should see "etcd" with the UP state. If not, check the Error column for more information.
* If no "etcd" targets are even shown on this page, prometheus isn't attempting to scrape it.
* You should see "etcd" with the UP state. If not, check the Error column for more information.
* If no "etcd" targets are even shown on this page, prometheus isn't attempting to scrape it.

View File

@@ -1,28 +1,55 @@
# Monitoring other Kubernetes Namespaces
This guide will help you monitor applications in other Namespaces. By default the RBAC rules are only enabled for the `Default` and `kube-system` Namespace during Install.
---
weight: 306
toc: true
title: Monitoring other Namespaces
menu:
docs:
parent: kube
lead: This guide will help you monitoring applications in other namespaces.
images: []
draft: false
description: This guide will help you monitoring applications in other namespaces.
---
By default the RBAC rules are only enabled for the `Default` and `kube-system` namespaces.
# Setup
You have to give the list of the Namespaces that you want to be able to monitor.
You have to give the list of the namespaces that you want to be able to monitor.
This is done in the variable `prometheus.roleSpecificNamespaces`. You usually set this in your `.jsonnet` file when building the manifests.
Example to create the needed `Role` and `RoleBinding` for the Namespace `foo` :
```
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + {
_config+:: {
namespace: 'monitoring',
Example to create the needed `Role` and `RoleBinding` for the Namespace `foo` :
prometheus+:: {
namespaces: ["default", "kube-system", "foo"],
```
local kp =
(import 'kube-prometheus/main.libsonnet') +
{
values+:: {
common+: {
namespace: 'monitoring',
},
prometheus+:: {
namespaces: ["default", "kube-system", "monitoring", "foo"],
},
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
};
{ 'setup/0namespace-namespace': kp.kubePrometheus.namespace } +
{
['setup/prometheus-operator-' + name]: kp.prometheusOperator[name]
for name in std.filter((function(name) name != 'serviceMonitor' && name != 'prometheusRule'), std.objectFields(kp.prometheusOperator))
} +
// serviceMonitor and prometheusRule are separated so that they can be created after the CRDs are ready
{ 'prometheus-operator-serviceMonitor': kp.prometheusOperator.serviceMonitor } +
{ 'prometheus-operator-prometheusRule': kp.prometheusOperator.prometheusRule } +
{ 'kube-prometheus-prometheusRule': kp.kubePrometheus.prometheusRule } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['blackbox-exporter-' + name]: kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['kubernetes-' + name]: kp.kubernetesControlPlane[name] for name in std.objectFields(kp.kubernetesControlPlane) }
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) }
```

24
docs/security.md Normal file
View File

@@ -0,0 +1,24 @@
## Security
The manifests generated in this repository are subject to a security audit in CI via [kubescape](https://github.com/armosec/kubescape).
The scan can be run locally via `make kubescape`.
While we aim for best practices in terms of security by default, due to the nature of the project, we are required to make the exceptions in the following components:
#### node-exporter
* Host Port is set. [Kubernetes already sets a Host Port by default when Host Network is enabled.](https://github.com/kubernetes/kubernetes/blob/1945829906546caf867992669a0bfa588edf8be6/pkg/apis/core/v1/defaults.go#L402-L411). Since nothing can be done here, we configure it to our preference port.
* Host PID is set to `true`, since node-exporter requires direct access to the host namespace to gather statistics.
* Host Network is set to `true`, since node-exporter requires direct access to the host network to gather statistics.
* `automountServiceAccountToken` is set to `true` on Pod level as kube-rbac-proxy sidecar requires connection to kubernetes API server.
#### prometheus-adapter
* `automountServiceAccountToken` is set to `true` on Pod level as application requires connection to kubernetes API server.
#### blackbox-exporter
* `automountServiceAccountToken` is set to `true` on Pod level as kube-rbac-proxy sidecar requires connection to kubernetes API server.
#### kube-state-metrics
* `automountServiceAccountToken` is set to `true` on Pod level as kube-rbac-proxy sidecars requires connection to kubernetes API server.
#### prometheus-operator
* `automountServiceAccountToken` is set to `true` on Pod level as kube-rbac-proxy sidecars requires connection to kubernetes API server.

49
docs/troubleshooting.md Normal file
View File

@@ -0,0 +1,49 @@
# Troubleshooting
See the general [guidelines](community-support.md) for getting support from the community.
## Error retrieving kubelet metrics
Should the Prometheus `/targets` page show kubelet targets, but not able to successfully scrape the metrics, then most likely it is a problem with the authentication and authorization setup of the kubelets.
As described in the [README.md Prerequisites](../README.md#prerequisites) section, in order to retrieve metrics from the kubelet token authentication and authorization must be enabled. Some Kubernetes setup tools do not enable this by default.
- If you are using Google's GKE product, see [cAdvisor support](GKE-cadvisor-support.md).
- If you are using AWS EKS, see [AWS EKS CNI support](EKS-cni-support.md).
- If you are using Weave Net, see [Weave Net support](weave-net-support.md).
### Authentication problem
The Prometheus `/targets` page will show the kubelet job with the error `403 Unauthorized`, when token authentication is not enabled. Ensure, that the `--authentication-token-webhook=true` flag is enabled on all kubelet configurations.
### Authorization problem
The Prometheus `/targets` page will show the kubelet job with the error `401 Unauthorized`, when token authorization is not enabled. Ensure that the `--authorization-mode=Webhook` flag is enabled on all kubelet configurations.
## kube-state-metrics resource usage
In some environments, kube-state-metrics may need additional
resources. One driver for more resource needs, is a high number of
namespaces. There may be others.
kube-state-metrics resource allocation is managed by
[addon-resizer](https://github.com/kubernetes/autoscaler/tree/master/addon-resizer/nanny)
You can control it's parameters by setting variables in the
config. They default to:
```jsonnet
kubeStateMetrics+:: {
baseCPU: '100m',
cpuPerNode: '2m',
baseMemory: '150Mi',
memoryPerNode: '30Mi',
}
```
## Error retrieving kube-proxy metrics
By default, kubeadm will configure kube-proxy to listen on 127.0.0.1 for metrics. Because of this prometheus would not be able to scrape these metrics. This would have to be changed to 0.0.0.0 in one of the following two places:
1. Before cluster initialization, the config file passed to kubeadm init should have KubeProxyConfiguration manifest with the field metricsBindAddress set to 0.0.0.0:10249
2. If the k8s cluster is already up and running, we'll have to modify the configmap kube-proxy in the namespace kube-system and set the metricsBindAddress field. After this kube-proxy daemonset would have to be restarted with
`kubectl -n kube-system rollout restart daemonset kube-proxy`

29
docs/update.md Normal file
View File

@@ -0,0 +1,29 @@
# Update kube-prometheus
You may wish to fetch changes made on this project so they are available to you.
## Update jb
`jb` may have been updated so it's a good idea to get the latest version of this binary:
```shell
$ go install -a github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest
```
## Update kube-prometheus
The command below will sync with upstream project:
```shell
$ jb update
```
## Compile the manifests and apply
Once updated, just follow the instructions under [Generating](customizing.md#generating) and [Apply the kube-prometheus stack](customizing.md#apply-the-kube-prometheus-stack) from [customizing.md doc](customizing.md) to apply the changes to your cluster.
## Migration from previous versions
If you are migrating from `release-0.7` branch or earlier please read [what changed and how to migrate in our guide](https://github.com/prometheus-operator/kube-prometheus/blob/main/docs/migration-guide.md).
Refer to [migration document](migration-example) for more information about migration from 0.3 and 0.8 versions of kube-prometheus.

View File

@@ -1,12 +1,14 @@
# Setup Weave Net monitoring using kube-prometheus
[Weave Net](https://kubernetes.io/docs/concepts/cluster-administration/networking/#weave-net-from-weaveworks) is a resilient and simple to use CNI provider for Kubernetes. A well monitored and observed CNI provider helps in troubleshooting Kubernetes networking problems. [Weave Net](https://www.weave.works/docs/net/latest/concepts/how-it-works/) emits [prometheus metrics](https://www.weave.works/docs/net/latest/tasks/manage/metrics/) for monitoring Weave Net. There are many ways to install Weave Net in your cluster. One of them is using [kops](https://github.com/kubernetes/kops/blob/master/docs/networking.md).
Following this document, you can setup Weave Net monitoring for your cluster using kube-prometheus.
## Contents
Using kube-prometheus and kubectl you will be able install the following for monitoring Weave Net in your cluster:
1. [Service for Weave Net](https://gist.github.com/alok87/379c6234b582f555c141f6fddea9fbce) The service which the [service monitor](https://coreos.com/operators/prometheus/docs/latest/user-guides/cluster-monitoring.html) scrapes.
1. [Service for Weave Net](https://gist.github.com/alok87/379c6234b582f555c141f6fddea9fbce) The service which the ServiceMonitor scrapes.
2. [ServiceMonitor for Weave Net](https://gist.github.com/alok87/e46a7f9a79ef6d1da6964a035be2cfb9) Service monitor to scrape the Weave Net metrics and bring it to Prometheus.
3. [Prometheus Alerts for Weave Net](https://stackoverflow.com/a/60447864) This will setup all the important Weave Net metrics you should be alerted on.
4. [Grafana Dashboard for Weave Net](https://grafana.com/grafana/dashboards/11789) This will setup the per Weave Net pod level monitoring for Weave Net.
@@ -15,38 +17,43 @@ Using kube-prometheus and kubectl you will be able install the following for mon
## Instructions
- You can monitor Weave Net using an example like below. **Please note that some alert configurations are environment specific and may require modifications of alert thresholds**. For example: The FastDP flows have never gone below 15000 for us. But if this value is say 20000 for you then you can use an example like below to update the alert. The alerts which may require threshold modifications are `WeaveNetFastDPFlowsLow` and `WeaveNetIPAMUnreachable`.
[embedmd]:# (../examples/weave-net-example.jsonnet)
```jsonnet
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/kube-prometheus-weave-net.libsonnet') + {
_config+:: {
namespace: 'monitoring',
```jsonnet mdox-exec="cat examples/weave-net-example.jsonnet"
local kp = (import 'kube-prometheus/main.libsonnet') +
(import 'kube-prometheus/addons/weave-net/weave-net.libsonnet') + {
values+:: {
common+: {
namespace: 'monitoring',
},
},
prometheusAlerts+:: {
groups: std.map(
function(group)
if group.name == 'weave-net' then
group {
rules: std.map(
function(rule)
if rule.alert == 'WeaveNetFastDPFlowsLow' then
rule {
expr: 'sum(weave_flows) < 20000',
}
else if rule.alert == 'WeaveNetIPAMUnreachable' then
rule {
expr: 'weave_ipam_unreachable_percentage > 25',
}
else
rule
,
group.rules
),
}
else
group,
super.groups
),
kubernetesControlPlane+: {
prometheusRuleWeaveNet+: {
spec+: {
groups: std.map(
function(group)
if group.name == 'weave-net' then
group {
rules: std.map(
function(rule)
if rule.alert == 'WeaveNetFastDPFlowsLow' then
rule {
expr: 'sum(weave_flows) < 20000',
}
else if rule.alert == 'WeaveNetIPAMUnreachable' then
rule {
expr: 'weave_ipam_unreachable_percentage > 25',
}
else
rule
,
group.rules
),
}
else
group,
super.groups
),
},
},
},
};
@@ -60,6 +67,7 @@ local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') +
```
- After you have the required yamls file please run
```
kubectl create -f prometheus-serviceWeaveNet.yaml
kubectl create -f prometheus-serviceMonitorWeaveNet.yaml

40
docs/windows.md Normal file
View File

@@ -0,0 +1,40 @@
# Windows
The [Windows hostprocess addon](../examples/windows-hostprocess.jsonnet) adds the dashboards and rules from [kubernetes-monitoring/kubernetes-mixin](https://github.com/kubernetes-monitoring/kubernetes-mixin#dashboards-for-windows-nodes).
It also deploys [windows_exporter](https://github.com/prometheus-community/windows_exporter) as a [hostprocess pod](https://github.com/prometheus-community/windows_exporter/blob/master/kubernetes/kubernetes.md) as Kubernetes now supports HostProcess containers on Windows nodes (as of [v1.22](https://kubernetes.io/blog/2021/08/16/windows-hostprocess-containers/)). The cluster should be using containerd runtime.
```
local kp = (import 'kube-prometheus/main.libsonnet') +
(import 'kube-prometheus/addons/windows-hostprocess.libsonnet') +
{
values+:: {
windowsExporter+:: {
image: "ghcr.io/prometheus-community/windows-exporter",
version: "0.21.0",
},
},
};
{ ['windows-exporter-' + name]: kp.windowsExporter[name] for name in std.objectFields(kp.windowsExporter) }
```
See the [full example](../examples/windows-hostprocess.jsonnet) for setup.
If the cluster is running docker runtime then use the other [Windows addon](../examples/windows.jsonnet). The Windows addon does not deploy windows_exporter. Docker based Windows does not support running with [windows_exporter](https://github.com/prometheus-community/windows_exporter) in a pod so this add on uses [additional scrape configuration](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/additional-scrape-config.md) to set up a static config to scrape the node ports where windows_exporter is configured.
The addon requires you to specify the node ips and ports where it can find the windows_exporter. See the [full example](../examples/windows.jsonnet) for setup.
```
local kp = (import 'kube-prometheus/main.libsonnet') +
(import 'kube-prometheus/addons/windows.libsonnet') +
{
values+:: {
windowsScrapeConfig+:: {
static_configs: {
targets: ["10.240.0.65:5000", "10.240.0.63:5000"],
},
},
},
};
```

View File

@@ -1,28 +1,37 @@
local kp =
(import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/main.libsonnet') +
// Uncomment the following imports to enable its patches
// (import 'kube-prometheus/kube-prometheus-anti-affinity.libsonnet') +
// (import 'kube-prometheus/kube-prometheus-managed-cluster.libsonnet') +
// (import 'kube-prometheus/kube-prometheus-node-ports.libsonnet') +
// (import 'kube-prometheus/kube-prometheus-static-etcd.libsonnet') +
// (import 'kube-prometheus/kube-prometheus-thanos-sidecar.libsonnet') +
// (import 'kube-prometheus/kube-prometheus-custom-metrics.libsonnet') +
// (import 'kube-prometheus/addons/anti-affinity.libsonnet') +
// (import 'kube-prometheus/addons/managed-cluster.libsonnet') +
// (import 'kube-prometheus/addons/node-ports.libsonnet') +
// (import 'kube-prometheus/addons/static-etcd.libsonnet') +
// (import 'kube-prometheus/addons/custom-metrics.libsonnet') +
// (import 'kube-prometheus/addons/external-metrics.libsonnet') +
// (import 'kube-prometheus/addons/pyrra.libsonnet') +
{
_config+:: {
namespace: 'monitoring',
values+:: {
common+: {
namespace: 'monitoring',
},
},
};
{ ['setup/0namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ 'setup/0namespace-namespace': kp.kubePrometheus.namespace } +
{
['setup/prometheus-operator-' + name]: kp.prometheusOperator[name]
for name in std.filter((function(name) name != 'serviceMonitor'), std.objectFields(kp.prometheusOperator))
for name in std.filter((function(name) name != 'serviceMonitor' && name != 'prometheusRule'), std.objectFields(kp.prometheusOperator))
} +
// serviceMonitor is separated so that it can be created after the CRDs are ready
// { 'setup/pyrra-slo-CustomResourceDefinition': kp.pyrra.crd } +
// serviceMonitor and prometheusRule are separated so that they can be created after the CRDs are ready
{ 'prometheus-operator-serviceMonitor': kp.prometheusOperator.serviceMonitor } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ 'prometheus-operator-prometheusRule': kp.prometheusOperator.prometheusRule } +
{ 'kube-prometheus-prometheusRule': kp.kubePrometheus.prometheusRule } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['blackbox-exporter-' + name]: kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } +
// { ['pyrra-' + name]: kp.pyrra[name] for name in std.objectFields(kp.pyrra) if name != 'crd' } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['kubernetes-' + name]: kp.kubernetesControlPlane[name] for name in std.objectFields(kp.kubernetesControlPlane) }
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) }

View File

@@ -1,11 +1,13 @@
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + {
_config+:: {
namespace: 'monitoring',
local kp = (import 'kube-prometheus/main.libsonnet') + {
values+:: {
common+: {
namespace: 'monitoring',
},
prometheus+:: {
namespaces+: ['my-namespace', 'my-second-namespace'],
},
},
prometheus+:: {
exampleApplication: {
serviceMonitorMyNamespace: {
apiVersion: 'monitoring.coreos.com/v1',
kind: 'ServiceMonitor',
@@ -22,7 +24,7 @@ local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + {
],
selector: {
matchLabels: {
app: 'myapp',
'app.kubernetes.io/name': 'myapp',
},
},
},
@@ -37,4 +39,5 @@ local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + {
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } +
{ ['example-application-' + name]: kp.exampleApplication[name] for name in std.objectFields(kp.exampleApplication) }

View File

@@ -1,8 +1,10 @@
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + {
_config+:: {
namespace: 'monitoring',
local kp = (import 'kube-prometheus/main.libsonnet') + {
values+:: {
common+: {
namespace: 'monitoring',
},
prometheus+:: {
prometheus+: {
namespaces+: ['my-namespace', 'my-second-namespace'],
},
},

View File

@@ -0,0 +1,37 @@
# to know more about custom template language read alertmanager documentation
# inspired by : https://gist.github.com/milesbxf/e2744fc90e9c41b47aa47925f8ff6512
{{ define "slack.title" -}}
[{{ .Status | toUpper -}}
{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{- end -}}
] {{ template "__alert_severity_prefix_title" . }} {{ .CommonLabels.alertname }}
{{- end }}
{{ define "slack.color" -}}
{{ if eq .Status "firing" -}}
{{ if eq .CommonLabels.severity "warning" -}}
warning
{{- else if eq .CommonLabels.severity "critical" -}}
danger
{{- else -}}
#439FE0
{{- end -}}
{{ else -}}
good
{{- end }}
{{- end }}
{{ define "slack.icon_emoji" }}:prometheus:{{ end }}
{{/* The test to display in the alert */}}
{{ define "slack.text" -}}
{{ range .Alerts }}
{{- if .Annotations.message }}
{{ .Annotations.message }}
{{- end }}
{{- if .Annotations.description }}
{{ .Annotations.description }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,5 +1,5 @@
((import 'kube-prometheus/kube-prometheus.libsonnet') + {
_config+:: {
((import 'kube-prometheus/main.libsonnet') + {
values+:: {
alertmanager+: {
config: importstr 'alertmanager-config.yaml',
},

View File

@@ -0,0 +1,38 @@
local configmap(name, namespace, data) = {
apiVersion: 'v1',
kind: 'ConfigMap',
metadata: {
name: name,
namespace: namespace,
},
data: data,
};
local kp =
// different libsonnet imported
{
values+:: {
common+: {
namespace: 'monitoring',
},
alertmanager+: {
config: importstr 'alertmanager-config.yaml',
},
},
alertmanager+:: {
alertmanager+: {
spec+: {
// the important field configmaps:
configMaps: ['alert-templates'], // goes to etc/alermanager/configmaps
},
},
},
configmap+:: {
'alert-templates': configmap(
'alert-templates',
$.values.common.namespace, // could be $._config.namespace to assign namespace once
{ 'alertmanager-alert-template.tmpl': importstr 'alertmanager-alert-template.tmpl' },
),
},
};
{ [name + '-configmap']: kp.configmap[name] for name in std.objectFields(kp.configmap) }

View File

@@ -0,0 +1,27 @@
# external alertmanager yaml
global:
resolve_timeout: 10m
slack_api_url: url
route:
group_by: ['job']
group_wait: 30s
group_interval: 5m
repeat_interval: 12h
receiver: 'null'
routes:
- match:
alertname: Watchdog
receiver: 'null'
receivers:
- name: 'null'
- name: slack
slack_configs:
- channel: '#alertmanager-testing'
send_resolved: true
title: '{{ template "slack.title" . }}'
icon_emoji: '{{ template "slack.icon_emoji" . }}'
color: '{{ template "slack.color" . }}'
text: '{{ template "slack.text" . }}
templates:
- '/etc/alertmanager/configmaps/alert-templates/*.tmpl'

View File

@@ -1,5 +1,5 @@
((import 'kube-prometheus/kube-prometheus.libsonnet') + {
_config+:: {
((import 'kube-prometheus/main.libsonnet') + {
values+:: {
alertmanager+: {
config: |||
global:

View File

@@ -1,6 +1,7 @@
# external alertmanager yaml
global:
resolve_timeout: 10m
slack_api_url: url
route:
group_by: ['job']
group_wait: 30s
@@ -13,3 +14,17 @@ route:
receiver: 'null'
receivers:
- name: 'null'
- name: slack
slack_configs:
- channel: '#alertmanager-testing'
send_resolved: true
title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
text: |-
{{ range .Alerts }}
*Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
*Description:* {{ .Annotations.description }}
*Graph:* <{{ .GeneratorURL }}|:chart_with_upwards_trend:> *Runbook:* <{{ .Annotations.runbook }}|:spiral_note_pad:>
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
{{ end }}

View File

@@ -0,0 +1,19 @@
local kp = (import 'kube-prometheus/main.libsonnet') +
(import 'kube-prometheus/addons/all-namespaces.libsonnet') + {
values+:: {
common+: {
namespace: 'monitoring',
},
prometheus+: {
namespaces: [],
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }

View File

@@ -0,0 +1,16 @@
local kp = (import 'kube-prometheus/main.libsonnet') +
(import 'kube-prometheus/addons/anti-affinity.libsonnet') + {
values+:: {
common+: {
namespace: 'monitoring',
},
},
};
{ ['00namespace-' + name]: kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) } +
{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }

View File

@@ -19,4 +19,4 @@ spec:
- logging
selector:
matchLabels:
app: myapp
app.kubernetes.io/name: myapp

View File

@@ -0,0 +1,92 @@
local filter = {
kubernetesControlPlane+: {
prometheusRule+:: {
spec+: {
groups: std.map(
function(group)
if group.name == 'kubernetes-apps' then
group {
rules: std.filter(
function(rule)
rule.alert != 'KubeStatefulSetReplicasMismatch',
group.rules
),
}
else
group,
super.groups
),
},
},
},
};
local update = {
kubernetesControlPlane+: {
prometheusRule+:: {
spec+: {
groups: std.map(
function(group)
if group.name == 'kubernetes-apps' then
group {
rules: std.map(
function(rule)
if rule.alert == 'KubePodCrashLooping' then
rule {
expr: 'rate(kube_pod_container_status_restarts_total{namespace=kube-system,job="kube-state-metrics"}[10m]) * 60 * 5 > 0',
}
else
rule,
group.rules
),
}
else
group,
super.groups
),
},
},
},
};
local add = {
exampleApplication:: {
prometheusRule+: {
apiVersion: 'monitoring.coreos.com/v1',
kind: 'PrometheusRule',
metadata: {
name: 'example-application-rules',
namespace: $.values.common.namespace,
},
spec: (import 'existingrule.json'),
},
},
};
local kp = (import 'kube-prometheus/main.libsonnet') +
filter +
update +
add + {
values+:: {
common+: {
namespace: 'monitoring',
},
},
};
{ 'setup/0namespace-namespace': kp.kubePrometheus.namespace } +
{
['setup/prometheus-operator-' + name]: kp.prometheusOperator[name]
for name in std.filter((function(name) name != 'serviceMonitor' && name != 'prometheusRule'), std.objectFields(kp.prometheusOperator))
} +
// serviceMonitor and prometheusRule are separated so that they can be created after the CRDs are ready
{ 'prometheus-operator-serviceMonitor': kp.prometheusOperator.serviceMonitor } +
{ 'prometheus-operator-prometheusRule': kp.prometheusOperator.prometheusRule } +
{ 'kube-prometheus-prometheusRule': kp.kubePrometheus.prometheusRule } +
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['blackbox-exporter-' + name]: kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } +
{ ['kubernetes-' + name]: kp.kubernetesControlPlane[name] for name in std.objectFields(kp.kubernetesControlPlane) } +
{ ['exampleApplication-' + name]: kp.exampleApplication[name] for name in std.objectFields(kp.exampleApplication) }

View File

@@ -0,0 +1,11 @@
## ArgoCD Example
This is the simplest, working example of an argocd app, the JSON object built is now an array of objects as that is the prefered format for ArgoCD. And ArgoCD specific annotations are added to manifests.
Requirements:
- **ArgoCD 1.7+**
- Follow the vendor generation steps at the root of this repository and generate a `vendored` folder (referenced in `application.yaml`).
- Make sure that argocd-cm has `application.instanceLabelKey` set to something else than `app.kubernetes.io/instance`, otherwise it will cause problems with prometheus target discovery. (see also [Why Is My App Out Of Sync Even After Syncing?](https://argo-cd.readthedocs.io/en/stable/faq/#why-is-my-app-out-of-sync-even-after-syncing))

View File

@@ -0,0 +1,25 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: kube-prometheus
namespace: argocd
annotations:
recipients.argocd-notifications.argoproj.io: "slack:jenkins"
spec:
destination:
namespace: monitoring
server: https://kubernetes.default.svc
project: monitoring
source:
directory:
jsonnet:
libs:
- vendored
recurse: true
path: examples/continuous-delivery/argocd/kube-prometheus
repoURL: git@github.com:prometheus-operator/kube-prometheus.git
targetRevision: HEAD
syncPolicy:
automated: {}
---

View File

@@ -0,0 +1,22 @@
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
annotations:
recipients.argocd-notifications.argoproj.io: slack:alerts
generation: 1
name: monitoring
namespace: argocd
spec:
clusterResourceWhitelist:
- group: "*"
kind: "*"
description: "Monitoring Stack deployment"
destinations:
- namespace: kube-system
server: https://kubernetes.default.svc
- namespace: default
server: https://kubernetes.default.svc
- namespace: monitoring
server: https://kubernetes.default.svc
sourceRepos:
- git@github.com:prometheus-operator/kube-prometheus.git

View File

@@ -0,0 +1,66 @@
// NB! Make sure that argocd-cm has `application.instanceLabelKey` set to something else than `app.kubernetes.io/instance`,
// otherwise it will cause problems with prometheus target discovery.
// See also https://argo-cd.readthedocs.io/en/stable/faq/#why-is-my-app-out-of-sync-even-after-syncing
local kp =
(import 'kube-prometheus/main.libsonnet') +
// Uncomment the following imports to enable its patches
// (import 'kube-prometheus/addons/anti-affinity.libsonnet') +
// (import 'kube-prometheus/addons/managed-cluster.libsonnet') +
// (import 'kube-prometheus/addons/node-ports.libsonnet') +
// (import 'kube-prometheus/addons/static-etcd.libsonnet') +
// (import 'kube-prometheus/addons/custom-metrics.libsonnet') +
// (import 'kube-prometheus/addons/external-metrics.libsonnet') +
// (import 'kube-prometheus/addons/pyrra.libsonnet') +
{
values+:: {
common+: {
namespace: 'monitoring',
},
},
};
// Unlike in kube-prometheus/example.jsonnet where a map of file-names to manifests is returned,
// for ArgoCD we need to return just a regular list with all the manifests.
local manifests =
[kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus)] +
[kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator)] +
[kp.alertmanager[name] for name in std.objectFields(kp.alertmanager)] +
[kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter)] +
[kp.grafana[name] for name in std.objectFields(kp.grafana)] +
// [ kp.pyrra[name] for name in std.objectFields(kp.pyrra)] +
[kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics)] +
[kp.kubernetesControlPlane[name] for name in std.objectFields(kp.kubernetesControlPlane)] +
[kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter)] +
[kp.prometheus[name] for name in std.objectFields(kp.prometheus)] +
[kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter)];
local argoAnnotations(manifest) =
manifest {
metadata+: {
annotations+: {
'argocd.argoproj.io/sync-wave':
// Make sure to sync the Namespace & CRDs before anything else (to avoid sync failures)
if std.member(['CustomResourceDefinition', 'Namespace'], manifest.kind)
then '-5'
// And sync all the roles outside of the main & kube-system last (in case some of the namespaces don't exist yet)
else if std.objectHas(manifest, 'metadata')
&& std.objectHas(manifest.metadata, 'namespace')
&& !std.member([kp.values.common.namespace, 'kube-system'], manifest.metadata.namespace)
then '10'
else '5',
'argocd.argoproj.io/sync-options':
// Use replace strategy for CRDs, as they're too big fit into the last-applied-configuration annotation that kubectl apply wants to use
if manifest.kind == 'CustomResourceDefinition' then 'Replace=true'
else '',
},
},
};
// Add argo-cd annotations to all the manifests
[
if std.endsWith(manifest.kind, 'List') && std.objectHas(manifest, 'items')
then manifest { items: [argoAnnotations(item) for item in manifest.items] }
else argoAnnotations(manifest)
for manifest in manifests
]

View File

@@ -0,0 +1,33 @@
local kp =
(import 'kube-prometheus/main.libsonnet') +
{
values+:: {
common+: {
namespace: 'monitoring',
},
grafana+: {
dashboards: std.mergePatch(super.dashboards, {
// Add more unwanted dashboards here
'alertmanager-overview.json': null,
}),
},
},
};
{ 'setup/0namespace-namespace': kp.kubePrometheus.namespace } +
{
['setup/prometheus-operator-' + name]: kp.prometheusOperator[name]
for name in std.filter((function(name) name != 'serviceMonitor' && name != 'prometheusRule'), std.objectFields(kp.prometheusOperator))
} +
// serviceMonitor and prometheusRule are separated so that they can be created after the CRDs are ready
{ 'prometheus-operator-serviceMonitor': kp.prometheusOperator.serviceMonitor } +
{ 'prometheus-operator-prometheusRule': kp.prometheusOperator.prometheusRule } +
{ 'kube-prometheus-prometheusRule': kp.kubePrometheus.prometheusRule } +
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } +
{ ['blackbox-exporter-' + name]: kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } +
{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } +
{ ['kubernetes-' + name]: kp.kubernetesControlPlane[name] for name in std.objectFields(kp.kubernetesControlPlane) }
{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } +
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) }

View File

@@ -1,20 +1,28 @@
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/kube-prometheus-eks.libsonnet') + {
_config+:: {
namespace: 'monitoring',
local kp = (import 'kube-prometheus/main.libsonnet') + {
values+:: {
common+: {
namespace: 'monitoring',
},
kubePrometheus+: {
platform: 'eks',
},
},
prometheusRules+:: {
groups+: [
{
name: 'example-group',
rules: [
kubernetesControlPlane+: {
prometheusRuleEksCNI+: {
spec+: {
groups+: [
{
record: 'aws_eks_available_ip',
expr: 'sum by(instance) (awscni_total_ip_addresses) - sum by(instance) (awscni_assigned_ip_addresses) < 10',
name: 'example-group',
rules: [
{
record: 'aws_eks_available_ip',
expr: 'sum by(instance) (awscni_total_ip_addresses) - sum by(instance) (awscni_assigned_ip_addresses) < 10',
},
],
},
],
},
],
},
},
};

View File

@@ -1,8 +1,9 @@
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/kube-prometheus-static-etcd.libsonnet') + {
_config+:: {
namespace: 'monitoring',
local kp = (import 'kube-prometheus/main.libsonnet') +
(import 'kube-prometheus/addons/static-etcd.libsonnet') + {
values+:: {
common+: {
namespace: 'monitoring',
},
etcd+:: {
ips: ['127.0.0.1'],
clientCA: importstr 'etcd-client-ca.crt',

View File

@@ -1,17 +1,18 @@
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/kube-prometheus-static-etcd.libsonnet') + {
_config+:: {
namespace: 'monitoring',
local kp = (import 'kube-prometheus/main.libsonnet') +
(import 'kube-prometheus/addons/static-etcd.libsonnet') + {
values+:: {
common+: {
namespace: 'monitoring',
},
// Reference info: https://github.com/coreos/kube-prometheus/blob/master/README.md#static-etcd-configuration
etcd+:: {
etcd+: {
// Configure this to be the IP(s) to scrape - i.e. your etcd node(s) (use commas to separate multiple values).
ips: ['127.0.0.1'],
// Reference info:
// * https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#servicemonitorspec (has endpoints)
// * https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint (has tlsConfig)
// * https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#tlsconfig (has: caFile, certFile, keyFile, serverName, & insecureSkipVerify)
// * https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#servicemonitorspec (has endpoints)
// * https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint (has tlsConfig)
// * https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#tlsconfig (has: caFile, certFile, keyFile, serverName, & insecureSkipVerify)
// Set these three variables to the fully qualified directory path on your work machine to the certificate files that are valid to scrape etcd metrics with (check the apiserver container).
// Most likely these certificates are generated somewhere in an infrastructure repository, so using the jsonnet `importstr` function can

View File

@@ -7,7 +7,7 @@ metadata:
namespace: default
spec:
selector:
app: example-app
app.kubernetes.io/name: example-app
ports:
- name: web
protocol: TCP
@@ -22,17 +22,17 @@ metadata:
spec:
selector:
matchLabels:
app: example-app
app.kubernetes.io/name: example-app
version: 1.1.3
replicas: 4
template:
metadata:
labels:
app: example-app
app.kubernetes.io/name: example-app
version: 1.1.3
spec:
containers:
- name: example-app
- name: example-app
image: quay.io/fabxc/prometheus_demo_service
ports:
- name: web

View File

@@ -1,4 +1,4 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: prometheus-frontend

View File

@@ -1,4 +1,4 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: alertmanager-discovery

View File

@@ -1,4 +1,4 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: prometheus-frontend

View File

@@ -1,4 +1,4 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: prometheus-frontend

View File

@@ -1 +1 @@
{"groups":[{"name":"example-group","rules":[{"alert":"Watchdog","annotations":{"description":"This is a Watchdog meant to ensure that the entire alerting pipeline is functional."},"expr":"vector(1)","labels":{"severity":"none"}}]}]}
{"groups":[{"name":"example-group","rules":[{"alert":"ExampleAlert","annotations":{"description":"This is an example alert."},"expr":"vector(1)","labels":{"severity":"warning"}}]}]}

View File

@@ -1,9 +1,9 @@
groups:
- name: example-group
rules:
- alert: Watchdog
- alert: ExampleAlert
expr: vector(1)
labels:
severity: "none"
severity: "warning"
annotations:
description: This is a Watchdog meant to ensure that the entire alerting pipeline is functional.
description: This is an example alert.

View File

@@ -5,35 +5,37 @@ local prometheus = grafana.prometheus;
local template = grafana.template;
local graphPanel = grafana.graphPanel;
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + {
_config+:: {
namespace: 'monitoring',
},
grafana+:: {
dashboards+:: {
'my-dashboard.json':
dashboard.new('My Dashboard')
.addTemplate(
{
current: {
text: 'Prometheus',
value: 'Prometheus',
local kp = (import 'kube-prometheus/main.libsonnet') + {
values+:: {
common+:: {
namespace: 'monitoring',
},
grafana+: {
dashboards+:: {
'my-dashboard.json':
dashboard.new('My Dashboard')
.addTemplate(
{
current: {
text: 'Prometheus',
value: 'Prometheus',
},
hide: 0,
label: null,
name: 'datasource',
options: [],
query: 'prometheus',
refresh: 1,
regex: '',
type: 'datasource',
},
hide: 0,
label: null,
name: 'datasource',
options: [],
query: 'prometheus',
refresh: 1,
regex: '',
type: 'datasource',
},
)
.addRow(
row.new()
.addPanel(graphPanel.new('My Panel', span=6, datasource='$datasource')
.addTarget(prometheus.target('vector(1)')))
),
)
.addRow(
row.new()
.addPanel(graphPanel.new('My Panel', span=6, datasource='$datasource')
.addTarget(prometheus.target('vector(1)')))
),
},
},
},
};

View File

@@ -1,10 +1,12 @@
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + {
_config+:: {
namespace: 'monitoring',
},
grafana+:: {
rawDashboards+:: {
'my-dashboard.json': (importstr 'example-grafana-dashboard.json'),
local kp = (import 'kube-prometheus/main.libsonnet') + {
values+:: {
common+:: {
namespace: 'monitoring',
},
grafana+: {
rawDashboards+:: {
'my-dashboard.json': (importstr 'example-grafana-dashboard.json'),
},
},
},
};

View File

@@ -1,13 +1,12 @@
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + {
_config+:: {
namespace: 'monitoring',
},
grafanaDashboards+:: { // monitoring-mixin compatibility
'my-dashboard.json': (import 'example-grafana-dashboard.json'),
},
grafana+:: {
dashboards+:: { // use this method to import your dashboards to Grafana
'my-dashboard.json': (import 'example-grafana-dashboard.json'),
local kp = (import 'kube-prometheus/main.libsonnet') + {
values+:: {
common+:: {
namespace: 'monitoring',
},
grafana+: {
dashboards+:: { // use this method to import your dashboards to Grafana
'my-dashboard.json': (import 'example-grafana-dashboard.json'),
},
},
},
};

View File

@@ -0,0 +1,36 @@
local kp =
(import 'kube-prometheus/main.libsonnet') +
{
values+:: {
common+: {
namespace: 'monitoring',
},
grafana+: {
config+: {
sections: {
'auth.ldap': {
enabled: true,
config_file: '/etc/grafana/ldap.toml',
allow_sign_up: true,
},
},
},
ldap: |||
[[servers]]
host = "127.0.0.1"
port = 389
use_ssl = false
start_tls = false
ssl_skip_verify = false
bind_dn = "cn=admins,dc=example,dc=com"
bind_password = 'grafana'
search_filter = "(cn=%s)"
search_base_dns = ["dc=example,dc=com"]
|||,
},
},
};
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }

View File

@@ -0,0 +1,25 @@
local kp =
(import 'kube-prometheus/main.libsonnet') +
{
values+:: {
common+: {
namespace: 'monitoring',
},
},
// Disable all grafana-related objects apart from dashboards and datasource
grafana: {
dashboardSources:: {},
deployment:: {},
serviceAccount:: {},
serviceMonitor:: {},
service:: {},
},
};
// Manifestation
{
[component + '-' + resource + '.json']: kp[component][resource]
for component in std.objectFields(kp)
for resource in std.objectFields(kp[component])
}

View File

@@ -0,0 +1,111 @@
local ingress(name, namespace, rules) = {
apiVersion: 'networking.k8s.io/v1',
kind: 'Ingress',
metadata: {
name: name,
namespace: namespace,
annotations: {
'nginx.ingress.kubernetes.io/auth-type': 'basic',
'nginx.ingress.kubernetes.io/auth-secret': 'basic-auth',
'nginx.ingress.kubernetes.io/auth-realm': 'Authentication Required',
},
},
spec: { rules: rules },
};
local kp =
(import 'kube-prometheus/main.libsonnet') +
{
_config+:: {
namespace: 'monitoring',
grafana+:: {
config+: {
sections+: {
server+: {
root_url: 'http://grafana.example.com/',
},
},
},
},
},
// Configure External URL's per application
alertmanager+:: {
alertmanager+: {
spec+: {
externalUrl: 'http://alertmanager.example.com',
},
},
},
prometheus+:: {
prometheus+: {
spec+: {
externalUrl: 'http://prometheus.example.com',
},
},
},
// Create one ingress object that routes to each individual application
ingress+:: {
'kube-prometheus': ingress(
'kube-prometheus',
$._config.namespace,
[
{
host: 'alertmanager.example.com',
http: {
paths: [{
backend: {
service: {
name: 'alertmanager-main',
port: 'web',
},
},
}],
},
},
{
host: 'grafana.example.com',
http: {
paths: [{
backend: {
service: {
name: 'grafana',
port: 'http',
},
},
}],
},
},
{
host: 'alertmanager.example.com',
http: {
paths: [{
backend: {
service: {
name: 'prometheus-k8s',
port: 'web',
},
},
}],
},
},
]
),
},
} + {
// Create basic auth secret - replace 'auth' file with your own
ingress+:: {
'basic-auth-secret': {
apiVersion: 'v1',
kind: 'Secret',
metadata: {
name: 'basic-auth',
namespace: $._config.namespace,
},
data: { auth: std.base64(importstr 'auth') },
type: 'Opaque',
},
},
};
{ [name + '-ingress']: kp.ingress[name] for name in std.objectFields(kp.ingress) }

View File

@@ -1,15 +1,25 @@
local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
local secret = k.core.v1.secret;
local ingress = k.extensions.v1beta1.ingress;
local ingressTls = ingress.mixin.spec.tlsType;
local ingressRule = ingress.mixin.spec.rulesType;
local httpIngressPath = ingressRule.mixin.http.pathsType;
local ingress(name, namespace, rules) = {
apiVersion: 'networking.k8s.io/v1',
kind: 'Ingress',
metadata: {
name: name,
namespace: namespace,
annotations: {
'nginx.ingress.kubernetes.io/auth-type': 'basic',
'nginx.ingress.kubernetes.io/auth-secret': 'basic-auth',
'nginx.ingress.kubernetes.io/auth-realm': 'Authentication Required',
},
},
spec: { rules: rules },
};
local kp =
(import 'kube-prometheus/kube-prometheus.libsonnet') +
(import 'kube-prometheus/main.libsonnet') +
{
_config+:: {
namespace: 'monitoring',
values+:: {
common+: {
namespace: 'monitoring',
},
grafana+:: {
config+: {
sections+: {
@@ -37,67 +47,83 @@ local kp =
},
// Create ingress objects per application
ingress+:: {
'alertmanager-main':
ingress.new() +
ingress.mixin.metadata.withName('alertmanager-main') +
ingress.mixin.metadata.withNamespace($._config.namespace) +
ingress.mixin.metadata.withAnnotations({
'nginx.ingress.kubernetes.io/auth-type': 'basic',
'nginx.ingress.kubernetes.io/auth-secret': 'basic-auth',
'nginx.ingress.kubernetes.io/auth-realm': 'Authentication Required',
}) +
ingress.mixin.spec.withRules(
ingressRule.new() +
ingressRule.withHost('alertmanager.example.com') +
ingressRule.mixin.http.withPaths(
httpIngressPath.new() +
httpIngressPath.mixin.backend.withServiceName('alertmanager-main') +
httpIngressPath.mixin.backend.withServicePort('web')
),
),
grafana:
ingress.new() +
ingress.mixin.metadata.withName('grafana') +
ingress.mixin.metadata.withNamespace($._config.namespace) +
ingress.mixin.metadata.withAnnotations({
'nginx.ingress.kubernetes.io/auth-type': 'basic',
'nginx.ingress.kubernetes.io/auth-secret': 'basic-auth',
'nginx.ingress.kubernetes.io/auth-realm': 'Authentication Required',
}) +
ingress.mixin.spec.withRules(
ingressRule.new() +
ingressRule.withHost('grafana.example.com') +
ingressRule.mixin.http.withPaths(
httpIngressPath.new() +
httpIngressPath.mixin.backend.withServiceName('grafana') +
httpIngressPath.mixin.backend.withServicePort('http')
),
),
'prometheus-k8s':
ingress.new() +
ingress.mixin.metadata.withName('prometheus-k8s') +
ingress.mixin.metadata.withNamespace($._config.namespace) +
ingress.mixin.metadata.withAnnotations({
'nginx.ingress.kubernetes.io/auth-type': 'basic',
'nginx.ingress.kubernetes.io/auth-secret': 'basic-auth',
'nginx.ingress.kubernetes.io/auth-realm': 'Authentication Required',
}) +
ingress.mixin.spec.withRules(
ingressRule.new() +
ingressRule.withHost('prometheus.example.com') +
ingressRule.mixin.http.withPaths(
httpIngressPath.new() +
httpIngressPath.mixin.backend.withServiceName('prometheus-k8s') +
httpIngressPath.mixin.backend.withServicePort('web')
),
),
'alertmanager-main': ingress(
'alertmanager-main',
$.values.common.namespace,
[{
host: 'alertmanager.example.com',
http: {
paths: [{
path: '/',
pathType: 'Prefix',
backend: {
service: {
name: 'alertmanager-main',
port: {
name: 'web',
},
},
},
}],
},
}]
),
grafana: ingress(
'grafana',
$.values.common.namespace,
[{
host: 'grafana.example.com',
http: {
paths: [{
path: '/',
pathType: 'Prefix',
backend: {
service: {
name: 'grafana',
port: {
name: 'http',
},
},
},
}],
},
}],
),
'prometheus-k8s': ingress(
'prometheus-k8s',
$.values.common.namespace,
[{
host: 'prometheus.example.com',
http: {
paths: [{
path: '/',
pathType: 'Prefix',
backend: {
service: {
name: 'prometheus-k8s',
port: {
name: 'web',
},
},
},
}],
},
}],
),
},
} + {
// Create basic auth secret - replace 'auth' file with your own
ingress+:: {
'basic-auth-secret':
secret.new('basic-auth', { auth: std.base64(importstr 'auth') }) +
secret.mixin.metadata.withNamespace($._config.namespace),
'basic-auth-secret': {
apiVersion: 'v1',
kind: 'Secret',
metadata: {
name: 'basic-auth',
namespace: $.values.common.namespace,
},
data: { auth: std.base64(importstr 'auth') },
type: 'Opaque',
},
},
};

Some files were not shown because too many files have changed in this diff Show More