diff --git a/stable/prometheus-operator/README.md b/stable/prometheus-operator/README.md index dcab697a61..1c6fbc1a6d 100644 --- a/stable/prometheus-operator/README.md +++ b/stable/prometheus-operator/README.md @@ -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` | diff --git a/stable/prometheus-operator/ci/test-values.yaml b/stable/prometheus-operator/ci/test-values.yaml index f8bcd8ab16..02ee6f0a78 100644 --- a/stable/prometheus-operator/ci/test-values.yaml +++ b/stable/prometheus-operator/ci/test-values.yaml @@ -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: "" diff --git a/stable/prometheus-operator/hack/sync_grafana_dashboards.py b/stable/prometheus-operator/hack/sync_grafana_dashboards.py index f548d0b7a3..2a43c15df2 100755 --- a/stable/prometheus-operator/hack/sync_grafana_dashboards.py +++ b/stable/prometheus-operator/hack/sync_grafana_dashboards.py @@ -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'] diff --git a/stable/prometheus-operator/hack/sync_prometheus_rules.py b/stable/prometheus-operator/hack/sync_prometheus_rules.py index 76242923fa..bc5aa0415b 100755 --- a/stable/prometheus-operator/hack/sync_prometheus_rules.py +++ b/stable/prometheus-operator/hack/sync_prometheus_rules.py @@ -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'] diff --git a/stable/prometheus-operator/templates/alertmanager/rules/etcd.yaml b/stable/prometheus-operator/templates/alertmanager/rules/etcd.yaml index dd0140dbba..80800f7ff8 100644 --- a/stable/prometheus-operator/templates/alertmanager/rules/etcd.yaml +++ b/stable/prometheus-operator/templates/alertmanager/rules/etcd.yaml @@ -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 diff --git a/stable/prometheus-operator/templates/grafana/dashboards/grafana-coredns-k8s.yaml b/stable/prometheus-operator/templates/grafana/dashboards/grafana-coredns-k8s.yaml index c7f3039310..bd6306d94a 100644 --- a/stable/prometheus-operator/templates/grafana/dashboards/grafana-coredns-k8s.yaml +++ b/stable/prometheus-operator/templates/grafana/dashboards/grafana-coredns-k8s.yaml @@ -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 diff --git a/stable/prometheus-operator/values.yaml b/stable/prometheus-operator/values.yaml index ecf931c212..e2d054589b 100644 --- a/stable/prometheus-operator/values.yaml +++ b/stable/prometheus-operator/values.yaml @@ -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: ""