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 <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

* Changes to chart testing config file for this repo

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

* Test actions with version bump to prometheus chart

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

* Release from main not master branch

Signed-off-by: Scott Rigby <[email protected]>

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

This reverts commit 81c50e5.

Signed-off-by: Scott Rigby <[email protected]>

* Allow requirements lock files

Signed-off-by: Scott Rigby <[email protected]>

* Initial CODEOWNERS file (#18)

Signed-off-by: Scott Rigby <[email protected]>

* 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 <[email protected]>

* fix xpp version

Signed-off-by: André Bauer <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

* 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 <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

* Fix header

Signed-off-by: Scott Rigby <[email protected]>

* Fix markdown linting

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

* Remove prometheus chart OWNERS file

Signed-off-by: Scott Rigby <[email protected]>

* Update prometheus-adapter chart README and bump version

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

* prometheus-adapter: fix configure command typos

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

* 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 <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

* 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 <[email protected]>

* Temporary workaround github API rate limiting

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

Co-authored-by: André Bauer <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

* 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 <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

* Fix typo

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

Co-authored-by: Manuel Rüger <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

Co-authored-by: Manuel Rüger <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

Co-authored-by: Manuel Rüger <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

Co-authored-by: Manuel Rüger <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

Co-authored-by: Manuel Rüger <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

Co-authored-by: Manuel Rüger <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

Co-authored-by: Manuel Rüger <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

Co-authored-by: Manuel Rüger <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

* Update charts/kube-prometheus/README.md

Signed-off-by: Scott Rigby <[email protected]>

Co-authored-by: Manuel Rüger <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

* 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 <[email protected]>

* Fix markdownlint

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

* 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 <[email protected]>

* Non-functional: update commented links to CRD sources

Co-authored-by: Quentin Bisson <[email protected]>

Signed-off-by: Scott Rigby <[email protected]>

* Add GitHub superlinter to lint markdown (#26)

* Create linter.yml

Signed-off-by: Torsten Walter <[email protected]>
Co-authored-by: Scott Rigby <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

* Add configuration for Stale GitHub app (#27)

Signed-off-by: Scott Rigby <[email protected]>

* 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 <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

* Rename chart dir

Signed-off-by: Scott Rigby <[email protected]>

* Update CODEOWNERS for new chart dir name

Signed-off-by: Scott Rigby <[email protected]>

* 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 <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

* Auto-sync README from main to gh-pages

Signed-off-by: Scott Rigby <[email protected]>

* Only runs on push to main

even if this workflow is copied to a new branch

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Ondrej Homolka <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: zanhsieh <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

* added link to github to readme (#51)

Signed-off-by: André Bauer <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

* 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 <[email protected]>

* sort charts alphabetically

Signed-off-by: Torsten Walter <[email protected]>

* adjust existing CODEOWNERS

Signed-off-by: Torsten Walter <[email protected]>

* link to CODEOWNERS file and fixed spelling

Signed-off-by: Torsten Walter <[email protected]>

* feat: adding issue templates (#54)

* feat: adding issue templates

Signed-off-by: gkarthiks <[email protected]>

* feat: PR template and review comments

Signed-off-by: gkarthiks <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

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

* adding gkarthiks for additional maintainers

Signed-off-by: gkarthiks <[email protected]>

* fix: new line char

Signed-off-by: gkarthiks <[email protected]>

* adding gkarthiks to codeowners against consul

Signed-off-by: gkarthiks <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

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

* added monotek to prometheus maintainers

Signed-off-by: André Bauer <[email protected]>

* rearrange the new codeowner for prometheus chart

Signed-off-by: Xtigyro <[email protected]>

Co-authored-by: Miroslav Hadzhiev <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

* [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 <[email protected]>

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

Signed-off-by: Jorrit Salverda <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

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

* formatted GitHub templates and made minor adjustments

Signed-off-by: Torsten Walter <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

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

* fix chart name in NOTES.txt

Signed-off-by: Xtigyro <[email protected]>

* rm whitespaces in NOTES.txt

Signed-off-by: Xtigyro <[email protected]>
Signed-off-by: Scott Rigby <[email protected]>

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

* feat: replacing grafana own repo

Signed-off-by: gkarthiks <[email protected]>

* fix: trailing white spaces

Signed-off-by: gkarthiks <[email protected]>

* fix: reverting the grafana values

Signed-off-by: gkarthiks <[email protected]>

* adding grafana repo for actions

Signed-off-by: gkarthiks <[email protected]>

* add: adding grafana repo in linter

Signed-off-by: gkarthiks <[email protected]>

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

Signed-off-by: gkarthiks <[email protected]>

* revert: reverting the old README statement

Signed-off-by: gkarthiks <[email protected]>

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

Signed-off-by: gkarthiks <[email protected]>

Signed-off-by: Karthikeyan Govindaraj <[email protected]>

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

Signed-off-by: Scott Rigby <[email protected]>

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

Signed-off-by: Miroslav Hadzhiev <[email protected]>

* Revert header for simplicity

Co-authored-by: Cédric de Saint Martin <[email protected]>

Signed-off-by: Scott Rigby <[email protected]>

Co-authored-by: André Bauer <[email protected]>
Co-authored-by: Manuel Rüger <[email protected]>
Co-authored-by: Torsten Walter <[email protected]>
Co-authored-by: hmlkao <[email protected]>
Co-authored-by: zanhsieh <[email protected]>
Co-authored-by: Karthikeyan Govindaraj <[email protected]>
Co-authored-by: Miroslav Hadzhiev <[email protected]>
Co-authored-by: Jorrit Salverda <[email protected]>

Signed-off-by: Scott Rigby <[email protected]>
  • 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/[email protected]
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: [email protected]
- name: gkarthiks
email: [email protected]
- name: scottrigby
email: [email protected]
- name: Xtigyro
email: [email protected]
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.