Extract prometheus.yaml into assets

It's a lot easier to show and explain the Prometheus config if available
in the standard yaml format. The Kubernetes ConfigMap specs can always
be auto-generated.
This commit is contained in:
Tobias Schmidt
2016-11-02 15:45:16 -04:00
parent d3ba116f71
commit 0613e00dcc
6 changed files with 81 additions and 9 deletions

View File

@@ -1,18 +1,15 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: prometheus-k8s
data:
prometheus.yaml: |
global:
evaluation_interval: 30s
scrape_interval: 15s
evaluation_interval: 15s
rule_files:
- /etc/prometheus/rules/*.rules
- /etc/prometheus/rules/*.rules
scrape_configs:
- job_name: kubelets
scrape_interval: 20s
scheme: https
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
@@ -27,7 +24,6 @@ data:
# Scrapes the endpoint lists for the Kubernetes API server, kube-state-metrics,
# and node-exporter, which we all consider part of a default setup.
- job_name: standard-endpoints
scrape_interval: 20s
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
# As for kubelets, certificate validation fails for the API server (node)
@@ -54,7 +50,6 @@ data:
# Scrapes the endpoint lists for the kube-dns server. Which we consider
# part of a default setup.
- job_name: kube-components
scrape_interval: 20s
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
@@ -74,3 +69,7 @@ data:
- action: keep
source_labels: [__meta_kubernetes_endpoint_port_name]
regex: "prometheus"
kind: ConfigMap
metadata:
creationTimestamp: null
name: prometheus-k8s

View File

@@ -53,6 +53,8 @@ data:
\ summary = \"high fsync durations\",\n description = \"ectd instance {{
$labels.instance }} fync durations are high\",\n }\n"
kubernetes.rules: |+
# NOTE: These rules were kindly contributed by the SoundCloud engineering team.
### Container resources ###
cluster_namespace_controller_pod_container:spec_memory_limit_bytes =