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:
@@ -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
|
||||
```
|
||||
```
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -4,8 +4,6 @@ metadata:
|
||||
name: example-app
|
||||
labels:
|
||||
tier: frontend
|
||||
annotations:
|
||||
prometheus.io/scrape: 'true'
|
||||
spec:
|
||||
selector:
|
||||
app: example-app
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
prometheus.io/scrape: 'true'
|
||||
labels:
|
||||
app: kube-state-metrics
|
||||
name: kube-state-metrics
|
||||
|
||||
@@ -3,8 +3,6 @@ kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: node-exporter
|
||||
annotations:
|
||||
prometheus.io/scrape: 'true'
|
||||
name: node-exporter
|
||||
spec:
|
||||
type: ClusterIP
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user