mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/prometheus-operator] adjust dashboards and rules sync (#10794)
* [stable/prometheus-operator] Enable etcd rules import Signed-off-by: Dmitry Verkhoturov <paskal.07@gmail.com> * [stable/prometheus-operator] Disable coredns dashboard sync Signed-off-by: Dmitry Verkhoturov <paskal.07@gmail.com> * [stable/prometheus-operator] Fix typos Signed-off-by: Dmitry Verkhoturov <paskal.07@gmail.com> * [stable/prometheus-operator] Bump version Signed-off-by: Dmitry Verkhoturov <paskal.07@gmail.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
41b9b3d0be
commit
0d8aa34edd
@@ -253,8 +253,8 @@ The following tables lists the configurable parameters of the prometheus-operato
|
||||
| `kubeDns.service.selector` | CoreDns service selector | `{"k8s-app" : "kube-dns" }` |
|
||||
| `kubeEtcd.enabled` | Deploy components to scrape etcd | `true` |
|
||||
| `kubeEtcd.endpoints` | Endpoints where etcd runs. Provide this if running etcd outside the cluster | `[]` |
|
||||
| `kubeEtcd.service.port` | Etct port | `4001` |
|
||||
| `kubeEtcd.service.targetPort` | Etct targetPort | `4001` |
|
||||
| `kubeEtcd.service.port` | Etcd port | `4001` |
|
||||
| `kubeEtcd.service.targetPort` | Etcd targetPort | `4001` |
|
||||
| `kubeEtcd.service.selector` | Selector for etcd if running inside the cluster | `{"k8s-app":"etcd-server"}` |
|
||||
| `kubeEtcd.servicemonitor.scheme` | Etcd servicemonitor scheme | `http` |
|
||||
| `kubeEtcd.servicemonitor.insecureSkipVerify` | Skip validating etcd TLS certificate when scraping | `false` |
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
##
|
||||
nameOverride: ""
|
||||
|
||||
## Provide a name to substitue for the full names of resources
|
||||
## Provide a name to substitute for the full names of resources
|
||||
##
|
||||
fullnameOverride: ""
|
||||
|
||||
|
||||
@@ -35,11 +35,6 @@ charts = [
|
||||
'destination': '../templates/grafana/dashboards',
|
||||
'type': 'json',
|
||||
},
|
||||
{
|
||||
'source': 'https://raw.githubusercontent.com/helm/charts/master/stable/prometheus-operator/dashboards/grafana-coredns-k8s.json',
|
||||
'destination': '../templates/grafana/dashboards',
|
||||
'type': 'json',
|
||||
},
|
||||
]
|
||||
|
||||
# Additional conditions map
|
||||
@@ -119,7 +114,11 @@ def main():
|
||||
# read the rules, create a new template file per group
|
||||
for chart in charts:
|
||||
print("Generating rules from %s" % chart['source'])
|
||||
raw_text = requests.get(chart['source']).text
|
||||
response = requests.get(chart['source'])
|
||||
if response.status_code != 200:
|
||||
print('Skipping the file, response code %s not equals 200' % response.status_code)
|
||||
continue
|
||||
raw_text = response.text
|
||||
if chart['type'] == 'yaml':
|
||||
yaml_text = yaml.load(raw_text)
|
||||
groups = yaml_text['items']
|
||||
|
||||
@@ -28,11 +28,10 @@ charts = [
|
||||
'source': 'https://raw.githubusercontent.com/coreos/prometheus-operator/master/contrib/kube-prometheus/manifests/prometheus-rules.yaml',
|
||||
'destination': '../templates/alertmanager/rules'
|
||||
},
|
||||
# don't uncomment until https://github.com/etcd-io/etcd/pull/10244 is merged
|
||||
# {
|
||||
# 'source': 'https://raw.githubusercontent.com/etcd-io/etcd/master/Documentation/op-guide/etcd3_alert.rules.yml',
|
||||
# 'destination': '../templates/alertmanager/rules'
|
||||
# },
|
||||
{
|
||||
'source': 'https://raw.githubusercontent.com/etcd-io/etcd/master/Documentation/op-guide/etcd3_alert.rules.yml',
|
||||
'destination': '../templates/alertmanager/rules'
|
||||
},
|
||||
]
|
||||
|
||||
# Additional conditions map
|
||||
@@ -185,7 +184,11 @@ def main():
|
||||
# read the rules, create a new template file per group
|
||||
for chart in charts:
|
||||
print("Generating rules from %s" % chart['source'])
|
||||
raw_text = requests.get(chart['source']).text
|
||||
response = requests.get(chart['source'])
|
||||
if response.status_code != 200:
|
||||
print('Skipping the file, response code %s not equals 200' % response.status_code)
|
||||
continue
|
||||
raw_text = response.text
|
||||
yaml_text = yaml.load(raw_text)
|
||||
# etcd workaround, their file don't have spec level
|
||||
groups = yaml_text['spec']['groups'] if yaml_text.get('spec') else yaml_text['groups']
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Generated from 'etcd' group from https://raw.githubusercontent.com/paskal/etcd/master/Documentation/op-guide/etcd3_alert.rules.yml
|
||||
# Generated from 'etcd' group from https://raw.githubusercontent.com/etcd-io/etcd/master/Documentation/op-guide/etcd3_alert.rules.yml
|
||||
{{- if and .Values.defaultRules.create .Values.kubeEtcd.enabled }}
|
||||
apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }}
|
||||
kind: PrometheusRule
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Generated from 'grafana-coredns-k8s' from https://raw.githubusercontent.com/helm/charts/master/stable/prometheus-operator/dashboards/grafana-coredns-k8s.json
|
||||
# Added manually, should be changed in-place.
|
||||
{{- if and .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.coreDns.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
##
|
||||
nameOverride: ""
|
||||
|
||||
## Provide a name to substitue for the full names of resources
|
||||
## Provide a name to substitute for the full names of resources
|
||||
##
|
||||
fullnameOverride: ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user