Skip to content

Commit

Permalink
[prometheus-operator] Rename to kube-prometheus-stack (#1)
Browse files Browse the repository at this point in the history
* Initial chart direectory rename prometheus-operator to kube-prometheus

See prometheus-community/community#28 (comment)

Signed-off-by: Scott Rigby <scott@r6by.com>

* First attempt at data change of prometheus-operator to kube-prometheus

Signed-off-by: Scott Rigby <scott@r6by.com>

* Helm GH Action files as-is from https://github.com/helm/charts-repo-actions-demo

Signed-off-by: Scott Rigby <scott@r6by.com>

* Bump chart-testing action to v1.0.0. See helm/charts-repo-actions-demo#20

Signed-off-by: Scott Rigby <scott@r6by.com>

* Changes to chart testing config file for this repo

Signed-off-by: Scott Rigby <scott@r6by.com>

* Use built-in GITHUB_TOKEN now that GH Actions bug is fixed. See helm/chart-releaser-action#26

Signed-off-by: Scott Rigby <scott@r6by.com>

* Test actions with version bump to prometheus chart

Signed-off-by: Scott Rigby <scott@r6by.com>

* Bump chart-releaser-action and kind-action to v1.0.0

Signed-off-by: Scott Rigby <scott@r6by.com>

* Release from main not master branch

Signed-off-by: Scott Rigby <scott@r6by.com>

* Revert "Test actions with version bump to prometheus chart"

This reverts commit 81c50e5.

Signed-off-by: Scott Rigby <scott@r6by.com>

* Allow requirements lock files

Signed-off-by: Scott Rigby <scott@r6by.com>

* Initial CODEOWNERS file (#18)

Signed-off-by: Scott Rigby <scott@r6by.com>

* Prep initial charts indexing (#14)

* [stable/prometheus] update prometheus to 2.20.1 and cm reloader to 0.4.0 (#23506)

* updated prometheus to 2.20.1 and cm reloader to 0.4.0

Signed-off-by: André Bauer <monotek23@gmail.com>

* fix xpp version

Signed-off-by: André Bauer <monotek23@gmail.com>

* Deprecate prometheus-operator chart before helm repo index, so that it won't be listed in the hubs

Signed-off-by: Scott Rigby <scott@r6by.com>

* Update prometheus-community/prometheus chart. Needed to update references to stable repo, but took the opportunity to reorganize, fix and simplify README

Signed-off-by: Scott Rigby <scott@r6by.com>

* Add Helm 3 commands before Helm 2. Add helm update command. Reorganize the 'Upgrading Chart' section

Signed-off-by: Scott Rigby <scott@r6by.com>

* Fix header

Signed-off-by: Scott Rigby <scott@r6by.com>

* Fix markdown linting

Signed-off-by: Scott Rigby <scott@r6by.com>

* Add direct links to values.yaml configuration file for easy browsing by end users without the CLI

Signed-off-by: Scott Rigby <scott@r6by.com>

* Remove prometheus chart OWNERS file

Signed-off-by: Scott Rigby <scott@r6by.com>

* Update prometheus-adapter chart README and bump version

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus chart: Return updated, working command example for Sharing Alerts Between Services

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus-adapter: fix configure command typos

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus-blackbox-exporter: Update readme, delete OWNERS file and bump chart version

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus-cloudwatch-exporter: Update Readme with new template, delete OWNERS file, bump chart version, update CHANGELOG

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus-consul-exporter: Update Readme per new template and bump chart

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus-couchdb-exporter: Update Readme per new template and bump chart version

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus-mongodb-exporter: Update Readme per new template, remove OWNERS file, bump chart version

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus-couchdb-exporter: Fix k8s 1.16 deprecated PodSecurityPolicy in the extensions/v1beta1 API version

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus-couchdb-exporter: Fix bad YAML indentation. How did this ever work?

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus-mysql-exporter: update readme per new template, remove OWNERS file, bump chart version

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus-nats-exporter: update readme per new template, move specific config note to values.yaml, remove OWNERS file, bump chart version

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus-node-exporter: update readme per new template, remove OWNERS file, bump chart version

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus-postgres-exporter: update readme per new template, remove OWNERS file, bump chart version

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus-pushgateway: update readme per new template, remove OWNERS file, bump chart version

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus-rabbitmq-exporter: update readme per new template, bump chart version

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus-redis-exporter: update readme per new template, remove OWNERS file, bump chart version

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus-snmp-exporter: update readme per new template, remove OWNERS file, bump chart version

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus-to-sd: update readme per new template, remove OWNERS file, bump chart version

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus-to-sd: fix deprecated deployment apps/v1beta1

Signed-off-by: Scott Rigby <scott@r6by.com>

* Remove instructions for stable repos from all charts, except prometheus and deprecated prometheus-operator, as only those have dependencies on stable charts

Signed-off-by: Scott Rigby <scott@r6by.com>

* Temporary workaround github API rate limiting

Signed-off-by: Scott Rigby <scott@r6by.com>

* prometheus-to-sd: missing required field "selector" in io.k8s.api.apps.v1.DeploymentSpec

Signed-off-by: Scott Rigby <scott@r6by.com>

* disable chart testing for prometheus-to-sd. If not running on GCE, will error: "Failed to get GCE config"

Signed-off-by: Scott Rigby <scott@r6by.com>

Co-authored-by: André Bauer <monotek@users.noreply.github.com>

* Add kube-prometheus chart maintainers to CODEOWNERS after merging main

Signed-off-by: Scott Rigby <scott@r6by.com>

* Un-deprecate chart within renaming to kube-prometheus PR

Signed-off-by: Scott Rigby <scott@r6by.com>

* Change all references to old coreos/prometheus-operator and coreos/kube-prometheus git repos to the new prometheus-operator github org

Signed-off-by: Scott Rigby <scott@r6by.com>

* Remove stray CODEOWNERS rule for charts/prometheus-operator/

Signed-off-by: Scott Rigby <scott@r6by.com>

* Fix typo

Signed-off-by: Scott Rigby <scott@r6by.com>

* Update charts/kube-prometheus/hack/README.md

Signed-off-by: Scott Rigby <scott@r6by.com>

Co-authored-by: Manuel Rüger <manuel@rueg.eu>
Signed-off-by: Scott Rigby <scott@r6by.com>

* Update charts/kube-prometheus/hack/README.md

Signed-off-by: Scott Rigby <scott@r6by.com>

Co-authored-by: Manuel Rüger <manuel@rueg.eu>
Signed-off-by: Scott Rigby <scott@r6by.com>

* Update charts/kube-prometheus/hack/README.md

Signed-off-by: Scott Rigby <scott@r6by.com>

Co-authored-by: Manuel Rüger <manuel@rueg.eu>
Signed-off-by: Scott Rigby <scott@r6by.com>

* Update charts/kube-prometheus/templates/prometheus/rules/prometheus-operator.yaml

Signed-off-by: Scott Rigby <scott@r6by.com>

Co-authored-by: Manuel Rüger <manuel@rueg.eu>
Signed-off-by: Scott Rigby <scott@r6by.com>

* Update charts/kube-prometheus/templates/prometheus/rules/node.rules.yaml

Signed-off-by: Scott Rigby <scott@r6by.com>

Co-authored-by: Manuel Rüger <manuel@rueg.eu>
Signed-off-by: Scott Rigby <scott@r6by.com>

* Update charts/kube-prometheus/templates/prometheus/rules/node-network.yaml

Signed-off-by: Scott Rigby <scott@r6by.com>

Co-authored-by: Manuel Rüger <manuel@rueg.eu>
Signed-off-by: Scott Rigby <scott@r6by.com>

* Update charts/kube-prometheus/templates/prometheus/rules/node-time.yaml

Signed-off-by: Scott Rigby <scott@r6by.com>

Co-authored-by: Manuel Rüger <manuel@rueg.eu>
Signed-off-by: Scott Rigby <scott@r6by.com>

* Update charts/kube-prometheus/templates/prometheus/rules/kubernetes-system.yaml

Signed-off-by: Scott Rigby <scott@r6by.com>

Co-authored-by: Manuel Rüger <manuel@rueg.eu>
Signed-off-by: Scott Rigby <scott@r6by.com>

* Update charts/kube-prometheus/README.md

Signed-off-by: Scott Rigby <scott@r6by.com>

Co-authored-by: Manuel Rüger <manuel@rueg.eu>
Signed-off-by: Scott Rigby <scott@r6by.com>

* Update dependency location and remove README note about chart source (it's easy to determine chart source from the dependency definition)

Signed-off-by: Scott Rigby <scott@r6by.com>

* Fix markdownlint

Signed-off-by: Scott Rigby <scott@r6by.com>

* Update kube-prometheus per new README template. See #14

Signed-off-by: Scott Rigby <scott@r6by.com>

* Remove requirements lock file for now, otherwise if we release the chart before transferring repo ownership the digest will differ. See helm pkg downloader Manager Build() method check for resolveRepoNames()

Signed-off-by: Scott Rigby <scott@r6by.com>

* Non-functional: update commented links to CRD sources

Co-authored-by: Quentin Bisson <quentin@giantswarm.io>

Signed-off-by: Scott Rigby <scott@r6by.com>

* Add GitHub superlinter to lint markdown (#26)

* Create linter.yml

Signed-off-by: Torsten Walter <mail@torstenwalter.de>
Co-authored-by: Scott Rigby <scott@r6by.com>
Signed-off-by: Scott Rigby <scott@r6by.com>

* Add configuration for Stale GitHub app (#27)

Signed-off-by: Scott Rigby <scott@r6by.com>

* disabled failing linters and fixed markdown issues (#32)

- fixes markdown issues reported by markdownlint
- disabled yamllint as helm templates are never valid
- disabled the other linters as there is a problem with a shell script and some python code
  once that is fixed we could enable them again

Signed-off-by: Torsten Walter <mail@torstenwalter.de>
Signed-off-by: Scott Rigby <scott@r6by.com>

* Rename chart dir

Signed-off-by: Scott Rigby <scott@r6by.com>

* Update CODEOWNERS for new chart dir name

Signed-off-by: Scott Rigby <scott@r6by.com>

* Rename instances of kube-prometheus to kube-prometheus-stack. Take care to leave references to the upstream kube-prometheus project (and related configs) as kube-prometheus

Signed-off-by: Scott Rigby <scott@r6by.com>

* Chart testing needs this repo info to test chart dependencies in the same repo

Signed-off-by: Scott Rigby <scott@r6by.com>

* Auto-sync README from main to gh-pages (#41)

* Auto-sync README from main to gh-pages

Signed-off-by: Scott Rigby <scott@r6by.com>

* Only runs on push to main

even if this workflow is copied to a new branch

Signed-off-by: Scott Rigby <scott@r6by.com>

* Improve README for main and gh pages (#43)

Signed-off-by: Scott Rigby <scott@r6by.com>

* [prometheus] unify labels and annotations across all deploymens and statefulsets (#45)

Signed-off-by: Ondrej Homolka <ondrej.homolka@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>

* [prometheus-redis-exporter] Add zanhsieh as maintainer (#46)

Signed-off-by: zanhsieh <zanhsieh@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>

* added link to github to readme (#51)

Signed-off-by: André Bauer <monotek23@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>

* Add PROCESSES document (#44)

* Add CODEOWNERS

I used this syntax in CODEOWNERS:

```
/chart/<name-of-chart> @maintainer
```

It matches any files in the chart directory at the root of the repository and any of its  subdirectories.
Without the leading `/` it would also match directories found somewhere
else. It's unlikely that those names would be used, but it does not harm
to do it this way.

Part-of: #38

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

* sort charts alphabetically

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

* adjust existing CODEOWNERS

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

* link to CODEOWNERS file and fixed spelling

Signed-off-by: Torsten Walter <mail@torstenwalter.de>

* feat: adding issue templates (#54)

* feat: adding issue templates

Signed-off-by: gkarthiks <github.gkarthiks@gmail.com>

* feat: PR template and review comments

Signed-off-by: gkarthiks <github.gkarthiks@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>

* [prometheus-consul-exporter] add gkarthiks as additional maintainers (#50)

* adding gkarthiks for additional maintainers

Signed-off-by: gkarthiks <github.gkarthiks@gmail.com>

* fix: new line char

Signed-off-by: gkarthiks <github.gkarthiks@gmail.com>

* adding gkarthiks to codeowners against consul

Signed-off-by: gkarthiks <github.gkarthiks@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>

* [prometheus] - adds monotek to prometheus maintainers (#55)

* added monotek to prometheus maintainers

Signed-off-by: André Bauer <andre.bauer@kiwigrid.com>

* rearrange the new codeowner for prometheus chart

Signed-off-by: Xtigyro <miroslav.hadzhiev@gmail.com>

Co-authored-by: Miroslav Hadzhiev <miroslav.hadzhiev@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>

* [prometheus-blackbox-exporter] fix linting failure due to deprecated api version (see issue #56) (#57)

* fix linting failure due to deprecated api version (see issue #56)

Signed-off-by: Jorrit Salverda <jsalverda@travix.com>

* use rbac.apiVersion template to set correct apiVersion for role and rolebinding

Signed-off-by: Jorrit Salverda <jsalverda@travix.com>
Signed-off-by: Scott Rigby <scott@r6by.com>

* formatted GitHub templates and made minor adjustments (#59)

* formatted GitHub templates and made minor adjustments

Signed-off-by: Torsten Walter <mail@torstenwalter.de>
Signed-off-by: Scott Rigby <scott@r6by.com>

* [kube-prometheus-stack] Fix Chart Name and Rm Whitespaces in "NOTES.txt" (#60)

* fix chart name in NOTES.txt

Signed-off-by: Xtigyro <miroslav.hadzhiev@gmail.com>

* rm whitespaces in NOTES.txt

Signed-off-by: Xtigyro <miroslav.hadzhiev@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>

* feat: replacing grafana rom stable to its own repo + additional chart maintainer (#53)

* feat: replacing grafana own repo

Signed-off-by: gkarthiks <github.gkarthiks@gmail.com>

* fix: trailing white spaces

Signed-off-by: gkarthiks <github.gkarthiks@gmail.com>

* fix: reverting the grafana values

Signed-off-by: gkarthiks <github.gkarthiks@gmail.com>

* adding grafana repo for actions

Signed-off-by: gkarthiks <github.gkarthiks@gmail.com>

* add: adding grafana repo in linter

Signed-off-by: gkarthiks <github.gkarthiks@gmail.com>

* doc(lint): making doc stmt as single stmt

Signed-off-by: gkarthiks <github.gkarthiks@gmail.com>

* revert: reverting the old README statement

Signed-off-by: gkarthiks <github.gkarthiks@gmail.com>

* feat: adding gkarthiks to codeowners against kube-prometheus-stack

Signed-off-by: gkarthiks <github.gkarthiks@gmail.com>

Signed-off-by: Karthikeyan Govindaraj <30545166+gkarthiks@users.noreply.github.com>

* Add scottrigby as co-maintainer of kube-prometheus-stack

Signed-off-by: Scott Rigby <scott@r6by.com>

* add xtigyro as maintainer for kube-prometheus-stack (#73)

Signed-off-by: Miroslav Hadzhiev <miroslav.hadzhiev@gmail.com>

* Revert header for simplicity

Co-authored-by: Cédric de Saint Martin <cdesaintmartin@wiremind.fr>

Signed-off-by: Scott Rigby <scott@r6by.com>

Co-authored-by: André Bauer <monotek@users.noreply.github.com>
Co-authored-by: Manuel Rüger <manuel@rueg.eu>
Co-authored-by: Torsten Walter <mail@torstenwalter.de>
Co-authored-by: hmlkao <ondrej.homolka@gmail.com>
Co-authored-by: zanhsieh <zanhsieh@gmail.com>
Co-authored-by: Karthikeyan Govindaraj <30545166+gkarthiks@users.noreply.github.com>
Co-authored-by: Miroslav Hadzhiev <miroslav.hadzhiev@gmail.com>
Co-authored-by: Jorrit Salverda <JorritSalverda@users.noreply.github.com>

Signed-off-by: Scott Rigby <scott@r6by.com>
  • Loading branch information
scottrigby authored Sep 9, 2020
1 parent 80d1ed0 commit b643f58
Show file tree
Hide file tree
Showing 194 changed files with 1,380 additions and 1,842 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Unless a later match takes precedence, they will be requested for review when someone opens a pull request.
* @prometheus-community/helm-charts-admins

/charts/kube-prometheus-stack/ @vsliouniaev @bismarck @gianrubio @gkarthiks @scottrigby @Xtigyro
/charts/prometheus/ @gianrubio @zanhsieh @Xtigyro @monotek @naseemkullah
/charts/prometheus-adapter/ @mattiasgees @steven-sheehy @hectorj2f
/charts/prometheus-blackbox-exporter/ @desaintmartin @gianrubio @monotek @rsotnychenko
Expand All @@ -16,7 +17,6 @@
/charts/prometheus-mysql-exporter @juanchimienti @monotek
/charts/prometheus-nats-exporter @okgolove @caarlos0
/charts/prometheus-node-exporter @gianrubio @vsliouniaev
/charts/prometheus-operator @vsliouniaev @bismarck @gianrubio
/charts/prometheus-postgres-exporter @gianrubio @zanhsieh
/charts/prometheus-pushgateway @gianrubio @cstaud
/charts/prometheus-rabbitmq-exporter @juanchimienti
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Add dependency chart repos
run: |
helm repo add stable https://kubernetes-charts.storage.googleapis.com/
helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
helm repo add grafana https://grafana.github.io/helm-charts
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
OWNERS
hack/
ci/
prometheus-operator-*.tgz
kube-prometheus-*.tgz
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Contributing Guidelines

## How to contribute to this chart

1. Fork this repository, develop and test your Chart.
1. Bump the chart version for every change.
1. Ensure PR title has the prefix `[stable/prometheus-operator]`
1. Ensure PR title has the prefix `[kube-prometheus-stack]`
1. When making changes to rules or dashboards, see the README.md section on how to sync data from upstream repositories
1. Check the `hack/minikube` folder has scripts to set up minikube and components of this chart that will allow all components to be scraped. You can use this configuration when validating your changes.
1. Check for changes of RBAC rules.
1. Check for changes in CRD specs.
1. PR must pass the linter (`helm lint`)
1. PR must pass the linter (`helm lint`)
26 changes: 26 additions & 0 deletions charts/kube-prometheus-stack/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: v1
description: kube-prometheus-stack collects Kubernetes manifests, Grafana dashboards, and Prometheus rules combined with documentation and scripts to provide easy to operate end-to-end Kubernetes cluster monitoring with Prometheus using the Prometheus Operator.
icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png
engine: gotpl
maintainers:
- name: vsliouniaev
- name: bismarck
- name: gianrubio
email: gianrubio@gmail.com
- name: gkarthiks
email: github.gkarthiks@gmail.com
- name: scottrigby
email: scott@r6by.com
- name: Xtigyro
email: miroslav.hadzhiev@gmail.com
name: kube-prometheus-stack
sources:
- https://github.com/prometheus-operator/kube-prometheus
- https://github.com/prometheus-operator/prometheus-operator
version: 9.3.4
appVersion: 0.38.1
tillerVersion: ">=2.12.0"
home: https://github.com/prometheus-operator/kube-prometheus
keywords:
- operator
- prometheus
312 changes: 312 additions & 0 deletions charts/kube-prometheus-stack/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# prometheus-operator hacks
# kube-prometheus-stack hacks

## [sync_prometheus_rules.py](sync_prometheus_rules.py)

This script generates prometheus rules set for alertmanager from any properly formatted kubernetes yaml based on defined input, splitting rules to separate files based on group name.

Currently following imported:

- [coreos/kube-prometheus rules set](https://github.com/coreos/kube-prometheus/master/manifests/prometheus-rules.yaml)
- [prometheus-operator/kube-prometheus rules set](https://github.com/prometheus-operator/kube-prometheus/master/manifests/prometheus-rules.yaml)
- In order to modify these rules:
- prepare and merge PR into [kubernetes-mixin](https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/rules) master and/or release branch
- run import inside your fork of [coreos/kube-prometheus](https://github.com/coreos/kube-prometheus/tree/master)
- run import inside your fork of [prometheus-operator/kube-prometheus](https://github.com/prometheus-operator/kube-prometheus/tree/master)

```bash
jb update
make generate-in-docker
```

- prepare and merge PR with imported changes into coreos/kube-prometheus master and/or release branch
- prepare and merge PR with imported changes into `prometheus-operator/kube-prometheus` master and/or release branch
- run sync_prometheus_rules.py inside your fork of this repo
- send PR with changes to this repo
- [etcd-io/etc rules set](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/etcd3_alert.rules.yml)
Expand All @@ -31,17 +31,17 @@ This script generates grafana dashboards from json files, splitting them to sepa

Currently following imported:

- [coreos/kube-prometheus dashboards](https://github.com/coreos/kube-prometheus/manifests/grafana-deployment.yaml)
- [prometheus-operator/kube-prometheus dashboards](https://github.com/prometheus-operator/kube-prometheus/manifests/grafana-deployment.yaml)
- In order to modify these dashboards:
- prepare and merge PR into [kubernetes-mixin](https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/dashboards) master and/or release branch
- run import inside your fork of [coreos/kube-prometheus](https://github.com/coreos/kube-prometheus/tree/master)
- run import inside your fork of [prometheus-operator/kube-prometheus](https://github.com/kube-prometheus/kube-prometheus/tree/master)

```bash
jb update
make generate-in-docker
```

- prepare and merge PR with imported changes into coreos/kube-prometheus master and/or release branch
- prepare and merge PR with imported changes into `prometheus-operator/kube-prometheus` master and/or release branch
- run sync_grafana_dashboards.py inside your fork of this repo
- send PR with changes to this repo
- [etcd-io/etc dashboard](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/grafana.json)
Expand All @@ -50,4 +50,4 @@ Currently following imported:
- run sync_grafana_dashboards.py inside your fork of this repo
- send PR with changes to this repo

[CoreDNS dashboard](https://github.com/helm/charts/blob/master/stable/prometheus-operator/templates/grafana/dashboards-1.14/k8s-coredns.yaml) is the only dashboard which is maintained in this repo and can be changed without import.
[CoreDNS dashboard](https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/templates/grafana/dashboards-1.14/k8s-coredns.yaml) is the only dashboard which is maintained in this repo and can be changed without import.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Testing on Minikube

The configuration in this folder lets you locally test the setup on minikube. Use cmd.sh to set up components and hack a working etcd scrape configuration. Run the commands in the sequence listed in the script to get a local working minikube cluster.

If you're using windows, there's a commented-out section that you should add to the minikube command.
If you're using windows, there's a commented-out section that you should add to the minikube command.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if [ "$1" = "init-etcd-secret" ]; then
fi


if [ "$1" = "prometheus-operator" ]; then
if [ "$1" = "upgrade-install" ]; then
helm upgrade $HELM_RELEASE_NAME $CHART \
--namespace $NAMESPACE \
--values $VALUES_FILES \
Expand Down Expand Up @@ -66,13 +66,13 @@ Commands:
the normal installation will not allow scraping of the kubelet,
scheduler or controller-manager components
init-helm - initialize helm and update repository so that we can install
the prometheus-operator chart. This has to be run only once after
the kube-prometheus-stack chart. This has to be run only once after
a minikube installation is done
init-etcd-secret - pulls the certs used to access etcd from the api server and creates
a secret in the monitoring namespace with them. The values files
in the install command assume that this secret exists and is valid.
If not, then prometheus will not start
prometheus-operator - install or upgrade the prometheus operator chart in the cluster
upgrade-install - install or upgrade the kube-prometheus-stack chart in the cluster
port-forward - starts port-forwarding for prometheus, alertmanager, grafana
localhost:9090 - prometheus
localhost:9093 - alertmanager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def new_representer(dumper, data):
# Source files list
charts = [
{
'source': 'https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml',
'source': 'https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml',
'destination': '../templates/grafana/dashboards-1.14',
'type': 'yaml',
'min_kubernetes': '1.14.0-0'
Expand All @@ -38,7 +38,7 @@ def new_representer(dumper, data):
'min_kubernetes': '1.14.0-0'
},
{
'source': 'https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml',
'source': 'https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml',
'destination': '../templates/grafana/dashboards',
'type': 'yaml',
'min_kubernetes': '1.10.0-0',
Expand Down Expand Up @@ -71,23 +71,23 @@ def new_representer(dumper, data):
header = '''{{- /*
Generated from '%(name)s' from %(url)s
Do not change in-place! In order to change this file first read following link:
https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack
*/ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
{{- if and (semverCompare ">=%(min_kubernetes)s" $kubeTargetVersion) (semverCompare "<%(max_kubernetes)s" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled%(condition)s }}
apiVersion: v1
kind: ConfigMap
metadata:
namespace: {{ template "prometheus-operator.namespace" . }}
name: {{ printf "%%s-%%s" (include "prometheus-operator.fullname" $) "%(name)s" | trunc 63 | trimSuffix "-" }}
namespace: {{ template "kube-prometheus-stack.namespace" . }}
name: {{ printf "%%s-%%s" (include "kube-prometheus-stack.fullname" $) "%(name)s" | trunc 63 | trimSuffix "-" }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
labels:
{{- if $.Values.grafana.sidecar.dashboards.label }}
{{ $.Values.grafana.sidecar.dashboards.label }}: "1"
{{- end }}
app: {{ template "prometheus-operator.name" $ }}-grafana
{{ include "prometheus-operator.labels" $ | indent 4 }}
app: {{ template "kube-prometheus-stack.name" $ }}-grafana
{{ include "kube-prometheus-stack.labels" $ | indent 4 }}
data:
'''

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def new_representer(dumper, data):
# Source files list
charts = [
{
'source': 'https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.yaml',
'source': 'https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/master/manifests/prometheus-rules.yaml',
'destination': '../templates/prometheus/rules-1.14',
'min_kubernetes': '1.14.0-0'
},
Expand All @@ -35,7 +35,7 @@ def new_representer(dumper, data):
'min_kubernetes': '1.14.0-0'
},
{
'source': 'https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/prometheus-rules.yaml',
'source': 'https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/release-0.1/manifests/prometheus-rules.yaml',
'destination': '../templates/prometheus/rules',
'min_kubernetes': '1.10.0-0',
'max_kubernetes': '1.14.0-0'
Expand Down Expand Up @@ -98,16 +98,16 @@ def new_representer(dumper, data):
replacement_map = {
'job="prometheus-operator"': {
'replacement': 'job="{{ $operatorJob }}"',
'init': '{{- $operatorJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "operator" }}'},
'init': '{{- $operatorJob := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "operator" }}'},
'job="prometheus-k8s"': {
'replacement': 'job="{{ $prometheusJob }}"',
'init': '{{- $prometheusJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus" }}'},
'init': '{{- $prometheusJob := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "prometheus" }}'},
'job="alertmanager-main"': {
'replacement': 'job="{{ $alertmanagerJob }}"',
'init': '{{- $alertmanagerJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "alertmanager" }}'},
'init': '{{- $alertmanagerJob := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "alertmanager" }}'},
'namespace="monitoring"': {
'replacement': 'namespace="{{ $namespace }}"',
'init': '{{- $namespace := printf "%s" (include "prometheus-operator.namespace" .) }}'},
'init': '{{- $namespace := printf "%s" (include "kube-prometheus-stack.namespace" .) }}'},
'alertmanager-$1': {
'replacement': '$1',
'init': ''},
Expand All @@ -128,18 +128,18 @@ def new_representer(dumper, data):
header = '''{{- /*
Generated from '%(name)s' group from %(url)s
Do not change in-place! In order to change this file first read following link:
https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/hack
*/ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
{{- if and (semverCompare ">=%(min_kubernetes)s" $kubeTargetVersion) (semverCompare "<%(max_kubernetes)s" $kubeTargetVersion) .Values.defaultRules.create%(condition)s }}%(init_line)s
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ printf "%%s-%%s" (include "prometheus-operator.fullname" .) "%(name)s" | trunc 63 | trimSuffix "-" }}
namespace: {{ template "prometheus-operator.namespace" . }}
name: {{ printf "%%s-%%s" (include "kube-prometheus-stack.fullname" .) "%(name)s" | trunc 63 | trimSuffix "-" }}
namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
app: {{ template "prometheus-operator.name" . }}
{{ include "prometheus-operator.labels" . | indent 4 }}
app: {{ template "kube-prometheus-stack.name" . }}
{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ dependencies:
condition: kubeStateMetrics.enabled

- name: prometheus-node-exporter
version: "1.10.*"
repository: https://kubernetes-charts.storage.googleapis.com/
version: "1.11.*"
repository: https://prometheus-community.github.io/helm-charts
condition: nodeExporter.enabled

- name: grafana
version: "5.3.*"
repository: https://kubernetes-charts.storage.googleapis.com/
version: "5.6.*"
repository: https://grafana.github.io/helm-charts
condition: grafana.enabled
4 changes: 4 additions & 0 deletions charts/kube-prometheus-stack/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ $.Chart.Name }} has been installed. Check its status by running:
kubectl --namespace {{ template "kube-prometheus-stack.namespace" . }} get pods -l "release={{ $.Release.Name }}"

Visit https://github.com/prometheus-operator/kube-prometheus for instructions on how to create & configure Alertmanager and Prometheus instances using the Operator.
Loading

0 comments on commit b643f58

Please sign in to comment.