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

Update manifests to latest version of Prometheus Operator #16

Merged
merged 5 commits into from
Dec 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ To tear it all down again, run:
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

The example manifests in [/manifests/examples/example-app](/manifests/examples/example-app)
Expand Down Expand Up @@ -133,4 +129,4 @@ default kubernetes 172.17.4.101:443
kube-system kube-controller-manager-prometheus-discovery 10.2.30.2:10252 1h
kube-system kube-scheduler-prometheus-discovery 10.2.30.4:10251 1h
monitoring etcd-k8s 172.17.4.51:2379 1h
```
```
2 changes: 1 addition & 1 deletion assets/prometheus/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ scrape_configs:
regex: "kube-(.*)-prometheus-discovery"
- action: keep
source_labels: [__meta_kubernetes_endpoint_port_name]
regex: "prometheus"
regex: "prometheus.*"
18 changes: 18 additions & 0 deletions manifests/alertmanager/alertmanager-config.yaml
Original file line number Diff line number Diff line change
@@ -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 changes: 14 additions & 0 deletions manifests/alertmanager/alertmanager-service.yaml
Original file line number Diff line number Diff line change
@@ -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 changes: 9 additions & 0 deletions manifests/alertmanager/alertmanager.yaml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 1 addition & 3 deletions manifests/etcd/etcd-bootkube-gce.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ metadata:
labels:
app: etcd
etcd: k8s
annotations:
prometheus.io/scrape: 'true'
spec:
type: ClusterIP
clusterIP: None
Expand All @@ -29,4 +27,4 @@ subsets:
ports:
- name: api
port: 2379
protocol: TCP
protocol: TCP
4 changes: 1 addition & 3 deletions manifests/etcd/etcd-bootkube-vagrant-multi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ metadata:
labels:
app: etcd
etcd: k8s
annotations:
prometheus.io/scrape: 'true'
spec:
type: ClusterIP
clusterIP: None
Expand All @@ -29,4 +27,4 @@ subsets:
ports:
- name: api
port: 2379
protocol: TCP
protocol: TCP
2 changes: 0 additions & 2 deletions manifests/examples/example-app/example-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ metadata:
name: example-app
labels:
tier: frontend
annotations:
prometheus.io/scrape: 'true'
spec:
selector:
app: example-app
Expand Down
14 changes: 13 additions & 1 deletion manifests/examples/example-app/prometheus-frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,20 @@ metadata:
labels:
prometheus: frontend
spec:
version: v1.3.0
version: v1.4.1
serviceMonitors:
- selector:
matchLabels:
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
2 changes: 0 additions & 2 deletions manifests/exporters/kube-state-metrics-svc.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/scrape: 'true'
labels:
app: kube-state-metrics
name: kube-state-metrics
Expand Down
2 changes: 1 addition & 1 deletion manifests/exporters/node-exporter-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
hostNetwork: true
hostPID: true
containers:
- image: quay.io/prometheus/node-exporter:0.12.0
- image: quay.io/prometheus/node-exporter:0.13.0
args:
- "-collector.procfs=/host/proc"
- "-collector.sysfs=/host/sys"
Expand Down
2 changes: 0 additions & 2 deletions manifests/exporters/node-exporter-svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ kind: Service
metadata:
labels:
app: node-exporter
annotations:
prometheus.io/scrape: 'true'
name: node-exporter
spec:
type: ClusterIP
Expand Down
4 changes: 1 addition & 3 deletions manifests/grafana/grafana-svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ metadata:
name: grafana
labels:
app: grafana
annotations:
prometheus.io/scrape: 'true'
spec:
type: NodePort
ports:
Expand All @@ -14,4 +12,4 @@ spec:
protocol: TCP
nodePort: 30902
selector:
app: grafana
app: grafana
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ metadata:
name: kube-controller-manager-prometheus-discovery
labels:
k8s-app: kube-controller-manager
annotations:
prometheus.io/scrape: 'true'
spec:
selector:
k8s-app: kube-controller-manager
Expand Down
20 changes: 20 additions & 0 deletions manifests/k8s/kube-dns-bootkube-vagrant-multi.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 0 additions & 2 deletions manifests/k8s/kube-scheduler-bootkube-vagrant-multi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ metadata:
name: kube-scheduler-prometheus-discovery
labels:
k8s-app: kube-scheduler
annotations:
prometheus.io/scrape: 'true'
spec:
selector:
k8s-app: kube-scheduler
Expand Down
2 changes: 1 addition & 1 deletion manifests/prometheus/prometheus-k8s-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ data:
regex: "kube-(.*)-prometheus-discovery"
- action: keep
source_labels: [__meta_kubernetes_endpoint_port_name]
regex: "prometheus"
regex: "prometheus.*"
kind: ConfigMap
metadata:
creationTimestamp: null
Expand Down
14 changes: 13 additions & 1 deletion manifests/prometheus/prometheus-k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,16 @@ metadata:
labels:
prometheus: k8s
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