Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[prometheus-operator] Rename to kube-prometheus-stack #1

Merged
merged 57 commits into from
Sep 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
c4a20c3
Initial chart direectory rename prometheus-operator to kube-prometheus
scottrigby Aug 9, 2020
50dbbaf
First attempt at data change of prometheus-operator to kube-prometheus
scottrigby Aug 9, 2020
4d30971
Helm GH Action files as-is from https://github.com/helm/charts-repo-a…
scottrigby Aug 9, 2020
2301461
Bump chart-testing action to v1.0.0. See https://github.com/helm/char…
scottrigby Aug 9, 2020
9ebf148
Changes to chart testing config file for this repo
scottrigby Aug 9, 2020
c584acb
Use built-in GITHUB_TOKEN now that GH Actions bug is fixed. See https…
scottrigby Aug 9, 2020
da0b4e0
Test actions with version bump to prometheus chart
scottrigby Aug 9, 2020
fef0c46
Bump chart-releaser-action and kind-action to v1.0.0
scottrigby Aug 15, 2020
b5f43fd
Release from main not master branch
scottrigby Aug 15, 2020
e727021
Revert "Test actions with version bump to prometheus chart"
scottrigby Aug 15, 2020
5ba0e88
Allow requirements lock files
scottrigby Aug 15, 2020
52eae40
Initial CODEOWNERS file (#18)
scottrigby Aug 16, 2020
a94381a
Prep initial charts indexing (#14)
scottrigby Aug 20, 2020
08fa414
Add kube-prometheus chart maintainers to CODEOWNERS after merging main
scottrigby Aug 21, 2020
4ce7966
Un-deprecate chart within renaming to kube-prometheus PR
scottrigby Aug 21, 2020
2e12e18
Change all references to old coreos/prometheus-operator and coreos/ku…
scottrigby Aug 21, 2020
b45902c
Remove stray CODEOWNERS rule for charts/prometheus-operator/
scottrigby Aug 21, 2020
849e6f4
Fix typo
scottrigby Aug 21, 2020
2376e67
Update charts/kube-prometheus/hack/README.md
scottrigby Aug 21, 2020
9d321b2
Update charts/kube-prometheus/hack/README.md
scottrigby Aug 21, 2020
8decfc3
Update charts/kube-prometheus/hack/README.md
scottrigby Aug 21, 2020
a187122
Update charts/kube-prometheus/templates/prometheus/rules/prometheus-o…
scottrigby Aug 21, 2020
de611e1
Update charts/kube-prometheus/templates/prometheus/rules/node.rules.yaml
scottrigby Aug 21, 2020
b8831e8
Update charts/kube-prometheus/templates/prometheus/rules/node-network…
scottrigby Aug 21, 2020
2b3bac7
Update charts/kube-prometheus/templates/prometheus/rules/node-time.yaml
scottrigby Aug 21, 2020
2ce5527
Update charts/kube-prometheus/templates/prometheus/rules/kubernetes-s…
scottrigby Aug 21, 2020
7327130
Update charts/kube-prometheus/README.md
scottrigby Aug 21, 2020
940afde
Update dependency location and remove README note about chart source …
scottrigby Aug 21, 2020
7143e7e
Fix markdownlint
scottrigby Aug 21, 2020
0e7149e
Update kube-prometheus per new README template. See #14
scottrigby Aug 21, 2020
fa1d5b4
Remove requirements lock file for now, otherwise if we release the ch…
scottrigby Aug 21, 2020
143b136
Non-functional: update commented links to CRD sources
scottrigby Aug 24, 2020
8551937
Add GitHub superlinter to lint markdown (#26)
torstenwalter Aug 24, 2020
0dc6452
Add configuration for Stale GitHub app (#27)
torstenwalter Aug 25, 2020
8cb1907
disabled failing linters and fixed markdown issues (#32)
torstenwalter Aug 28, 2020
faa9e79
Rename chart dir
scottrigby Sep 5, 2020
d24a534
Update CODEOWNERS for new chart dir name
scottrigby Sep 5, 2020
a13fb8c
Rename instances of kube-prometheus to kube-prometheus-stack. Take ca…
scottrigby Sep 5, 2020
aec739d
Chart testing needs this repo info to test chart dependencies in the …
scottrigby Sep 5, 2020
c4f61d3
Auto-sync README from main to gh-pages (#41)
scottrigby Sep 5, 2020
08d2dce
Improve README for main and gh pages (#43)
scottrigby Sep 5, 2020
a5c1619
[prometheus] unify labels and annotations across all deploymens and s…
hmlkao Sep 5, 2020
17d071b
[prometheus-redis-exporter] Add zanhsieh as maintainer (#46)
zanhsieh Sep 6, 2020
d4eb662
added link to github to readme (#51)
monotek Sep 6, 2020
9b6575a
Add PROCESSES document (#44)
torstenwalter Sep 6, 2020
36685a7
feat: adding issue templates (#54)
gkarthiks Sep 6, 2020
a48717c
[prometheus-consul-exporter] add gkarthiks as additional maintainers …
gkarthiks Sep 7, 2020
7cdaa41
[prometheus] - adds monotek to prometheus maintainers (#55)
monotek Sep 7, 2020
7488d27
[prometheus-blackbox-exporter] fix linting failure due to deprecated …
JorritSalverda Sep 7, 2020
317d2aa
formatted GitHub templates and made minor adjustments (#59)
torstenwalter Sep 7, 2020
6146874
[kube-prometheus-stack] Fix Chart Name and Rm Whitespaces in "NOTES.t…
Xtigyro Sep 7, 2020
e729fdb
feat: replacing grafana rom stable to its own repo + additional chart…
gkarthiks Sep 8, 2020
c6a2766
Add scottrigby as co-maintainer of kube-prometheus-stack
scottrigby Sep 9, 2020
cb157fb
Merge remote-tracking branch 'origin/main' into rename-prometheus-ope…
scottrigby Sep 9, 2020
5a8c3aa
Merge branch 'main' into rename-prometheus-operator-kube-prometheus
torstenwalter Sep 9, 2020
dd5a5ee
add xtigyro as maintainer for kube-prometheus-stack (#73)
Xtigyro Sep 9, 2020
bdb6827
Revert header for simplicity
scottrigby Sep 9, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding yourself as a maintainer ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gianrubio I guess you are asking @scottrigby right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gianrubio I guess you are asking @scottrigby right?

Exactly!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

- 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