Merge pull request #16 from brancz/default-resources
Update manifests to latest version of Prometheus Operator
This commit is contained in:
@@ -43,10 +43,6 @@ To tear it all down again, run:
|
|||||||
hack/cluster-monitoring/teardown
|
hack/cluster-monitoring/teardown
|
||||||
```
|
```
|
||||||
|
|
||||||
> All services in the manifest still contain the `prometheus.io/scrape = true`
|
|
||||||
> annotations. It is not used by the Prometheus Operator. They remain for
|
|
||||||
> pre Prometheus v1.3.0 deployments as in [this example configuration](https://github.com/prometheus/prometheus/blob/6703404cb431f57ca4c5097bc2762438d3c1968e/documentation/examples/prometheus-kubernetes.yml).
|
|
||||||
|
|
||||||
## Monitoring custom services
|
## Monitoring custom services
|
||||||
|
|
||||||
The example manifests in [/manifests/examples/example-app](/manifests/examples/example-app)
|
The example manifests in [/manifests/examples/example-app](/manifests/examples/example-app)
|
||||||
|
|||||||
@@ -65,4 +65,4 @@ scrape_configs:
|
|||||||
regex: "kube-(.*)-prometheus-discovery"
|
regex: "kube-(.*)-prometheus-discovery"
|
||||||
- action: keep
|
- action: keep
|
||||||
source_labels: [__meta_kubernetes_endpoint_port_name]
|
source_labels: [__meta_kubernetes_endpoint_port_name]
|
||||||
regex: "prometheus"
|
regex: "prometheus.*"
|
||||||
|
|||||||
18
manifests/alertmanager/alertmanager-config.yaml
Normal file
18
manifests/alertmanager/alertmanager-config.yaml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: alertmanager-main
|
||||||
|
data:
|
||||||
|
alertmanager.yaml: |-
|
||||||
|
global:
|
||||||
|
resolve_timeout: 5m
|
||||||
|
route:
|
||||||
|
group_by: ['job']
|
||||||
|
group_wait: 30s
|
||||||
|
group_interval: 5m
|
||||||
|
repeat_interval: 12h
|
||||||
|
receiver: 'webhook'
|
||||||
|
receivers:
|
||||||
|
- name: 'webhook'
|
||||||
|
webhook_configs:
|
||||||
|
- url: 'http://alertmanagerwh:30500/'
|
||||||
14
manifests/alertmanager/alertmanager-service.yaml
Normal file
14
manifests/alertmanager/alertmanager-service.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: alertmanager-main
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
ports:
|
||||||
|
- name: web
|
||||||
|
nodePort: 30903
|
||||||
|
port: 9093
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: web
|
||||||
|
selector:
|
||||||
|
alertmanager: alertmanager-main
|
||||||
9
manifests/alertmanager/alertmanager.yaml
Normal file
9
manifests/alertmanager/alertmanager.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: "monitoring.coreos.com/v1alpha1"
|
||||||
|
kind: "Alertmanager"
|
||||||
|
metadata:
|
||||||
|
name: "alertmanager-main"
|
||||||
|
labels:
|
||||||
|
alertmanager: "main"
|
||||||
|
spec:
|
||||||
|
replicas: 3
|
||||||
|
version: v0.5.1
|
||||||
@@ -5,8 +5,6 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
app: etcd
|
app: etcd
|
||||||
etcd: k8s
|
etcd: k8s
|
||||||
annotations:
|
|
||||||
prometheus.io/scrape: 'true'
|
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
clusterIP: None
|
clusterIP: None
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
app: etcd
|
app: etcd
|
||||||
etcd: k8s
|
etcd: k8s
|
||||||
annotations:
|
|
||||||
prometheus.io/scrape: 'true'
|
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
clusterIP: None
|
clusterIP: None
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ metadata:
|
|||||||
name: example-app
|
name: example-app
|
||||||
labels:
|
labels:
|
||||||
tier: frontend
|
tier: frontend
|
||||||
annotations:
|
|
||||||
prometheus.io/scrape: 'true'
|
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: example-app
|
app: example-app
|
||||||
|
|||||||
@@ -6,8 +6,20 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
prometheus: frontend
|
prometheus: frontend
|
||||||
spec:
|
spec:
|
||||||
version: v1.3.0
|
version: v1.4.1
|
||||||
serviceMonitors:
|
serviceMonitors:
|
||||||
- selector:
|
- selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
tier: frontend
|
tier: frontend
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
# 2Gi is default, but won't schedule if you don't have a node with >2Gi
|
||||||
|
# memory. Modify based on your target and time-series count for
|
||||||
|
# production use. This value is mainly meant for demonstration/testing
|
||||||
|
# purposes.
|
||||||
|
memory: 400Mi
|
||||||
|
alerting:
|
||||||
|
alertmanagers:
|
||||||
|
- namespace: monitoring
|
||||||
|
name: alertmanager-main
|
||||||
|
port: web
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
|
||||||
prometheus.io/scrape: 'true'
|
|
||||||
labels:
|
labels:
|
||||||
app: kube-state-metrics
|
app: kube-state-metrics
|
||||||
name: kube-state-metrics
|
name: kube-state-metrics
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ spec:
|
|||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
hostPID: true
|
hostPID: true
|
||||||
containers:
|
containers:
|
||||||
- image: quay.io/prometheus/node-exporter:0.12.0
|
- image: quay.io/prometheus/node-exporter:0.13.0
|
||||||
args:
|
args:
|
||||||
- "-collector.procfs=/host/proc"
|
- "-collector.procfs=/host/proc"
|
||||||
- "-collector.sysfs=/host/sys"
|
- "-collector.sysfs=/host/sys"
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ kind: Service
|
|||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: node-exporter
|
app: node-exporter
|
||||||
annotations:
|
|
||||||
prometheus.io/scrape: 'true'
|
|
||||||
name: node-exporter
|
name: node-exporter
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ metadata:
|
|||||||
name: grafana
|
name: grafana
|
||||||
labels:
|
labels:
|
||||||
app: grafana
|
app: grafana
|
||||||
annotations:
|
|
||||||
prometheus.io/scrape: 'true'
|
|
||||||
spec:
|
spec:
|
||||||
type: NodePort
|
type: NodePort
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ metadata:
|
|||||||
name: kube-controller-manager-prometheus-discovery
|
name: kube-controller-manager-prometheus-discovery
|
||||||
labels:
|
labels:
|
||||||
k8s-app: kube-controller-manager
|
k8s-app: kube-controller-manager
|
||||||
annotations:
|
|
||||||
prometheus.io/scrape: 'true'
|
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
k8s-app: kube-controller-manager
|
k8s-app: kube-controller-manager
|
||||||
|
|||||||
20
manifests/k8s/kube-dns-bootkube-vagrant-multi.yaml
Normal file
20
manifests/k8s/kube-dns-bootkube-vagrant-multi.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: kube-dns-prometheus-discovery
|
||||||
|
labels:
|
||||||
|
k8s-app: kube-dns
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
k8s-app: kube-dns
|
||||||
|
type: ClusterIP
|
||||||
|
clusterIP: None
|
||||||
|
ports:
|
||||||
|
- name: prometheus-skydns
|
||||||
|
port: 10055
|
||||||
|
targetPort: 10055
|
||||||
|
protocol: TCP
|
||||||
|
- name: prometheus-dnsmasq
|
||||||
|
port: 10054
|
||||||
|
targetPort: 10054
|
||||||
|
protocol: TCP
|
||||||
@@ -4,8 +4,6 @@ metadata:
|
|||||||
name: kube-scheduler-prometheus-discovery
|
name: kube-scheduler-prometheus-discovery
|
||||||
labels:
|
labels:
|
||||||
k8s-app: kube-scheduler
|
k8s-app: kube-scheduler
|
||||||
annotations:
|
|
||||||
prometheus.io/scrape: 'true'
|
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
k8s-app: kube-scheduler
|
k8s-app: kube-scheduler
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ data:
|
|||||||
regex: "kube-(.*)-prometheus-discovery"
|
regex: "kube-(.*)-prometheus-discovery"
|
||||||
- action: keep
|
- action: keep
|
||||||
source_labels: [__meta_kubernetes_endpoint_port_name]
|
source_labels: [__meta_kubernetes_endpoint_port_name]
|
||||||
regex: "prometheus"
|
regex: "prometheus.*"
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
|
|||||||
@@ -5,4 +5,16 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
prometheus: k8s
|
prometheus: k8s
|
||||||
spec:
|
spec:
|
||||||
version: v1.3.0
|
version: v1.4.1
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
# 2Gi is default, but won't schedule if you don't have a node with >2Gi
|
||||||
|
# memory. Modify based on your target and time-series count for
|
||||||
|
# production use. This value is mainly meant for demonstration/testing
|
||||||
|
# purposes.
|
||||||
|
memory: 400Mi
|
||||||
|
alerting:
|
||||||
|
alertmanagers:
|
||||||
|
- namespace: monitoring
|
||||||
|
name: alertmanager-main
|
||||||
|
port: web
|
||||||
|
|||||||
Reference in New Issue
Block a user