manifests: remove prometheus.io/scrape annotations

These annotations made sense in pre v1.3.0 Prometheus releases, however,
with >=v1.3.0 and the Prometheus Operator these annotations are more
confusing then helpful.
This commit is contained in:
Frederic Branczyk
2016-12-02 13:51:45 +01:00
parent 20f88eed10
commit 0c1bb5c1c9
9 changed files with 4 additions and 24 deletions

View File

@@ -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)
@@ -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
```
```

View File

@@ -5,8 +5,6 @@ metadata:
labels:
app: etcd
etcd: k8s
annotations:
prometheus.io/scrape: 'true'
spec:
type: ClusterIP
clusterIP: None
@@ -29,4 +27,4 @@ subsets:
ports:
- name: api
port: 2379
protocol: TCP
protocol: TCP

View File

@@ -5,8 +5,6 @@ metadata:
labels:
app: etcd
etcd: k8s
annotations:
prometheus.io/scrape: 'true'
spec:
type: ClusterIP
clusterIP: None
@@ -29,4 +27,4 @@ subsets:
ports:
- name: api
port: 2379
protocol: TCP
protocol: TCP

View File

@@ -4,8 +4,6 @@ metadata:
name: example-app
labels:
tier: frontend
annotations:
prometheus.io/scrape: 'true'
spec:
selector:
app: example-app

View File

@@ -1,8 +1,6 @@
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/scrape: 'true'
labels:
app: kube-state-metrics
name: kube-state-metrics

View File

@@ -3,8 +3,6 @@ kind: Service
metadata:
labels:
app: node-exporter
annotations:
prometheus.io/scrape: 'true'
name: node-exporter
spec:
type: ClusterIP

View File

@@ -4,8 +4,6 @@ metadata:
name: grafana
labels:
app: grafana
annotations:
prometheus.io/scrape: 'true'
spec:
type: NodePort
ports:
@@ -14,4 +12,4 @@ spec:
protocol: TCP
nodePort: 30902
selector:
app: grafana
app: grafana

View File

@@ -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

View File

@@ -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