Add annotations and ports to scrape weave metrics

This commit is contained in:
Zac Blazic 2019-07-26 13:46:04 +02:00
parent 8a146b1c64
commit 200a7583f3
5 changed files with 35 additions and 0 deletions

View File

@ -130,6 +130,7 @@ spec:
name: weave-net name: weave-net
role.kubernetes.io/networking: "1" role.kubernetes.io/networking: "1"
annotations: annotations:
prometheus.io/scrape: "true"
scheduler.alpha.kubernetes.io/critical-pod: '' scheduler.alpha.kubernetes.io/critical-pod: ''
spec: spec:
containers: containers:
@ -164,6 +165,9 @@ spec:
key: network-password key: network-password
{{- end }} {{- end }}
image: 'weaveworks/weave-kube:2.5.1' image: 'weaveworks/weave-kube:2.5.1'
ports:
- name: metrics
containerPort: 6782
readinessProbe: readinessProbe:
httpGet: httpGet:
host: 127.0.0.1 host: 127.0.0.1
@ -201,6 +205,9 @@ spec:
apiVersion: v1 apiVersion: v1
fieldPath: spec.nodeName fieldPath: spec.nodeName
image: 'weaveworks/weave-npc:2.5.1' image: 'weaveworks/weave-npc:2.5.1'
ports:
- name: metrics
containerPort: 6781
resources: resources:
requests: requests:
cpu: 50m cpu: 50m

View File

@ -116,6 +116,7 @@ spec:
name: weave-net name: weave-net
role.kubernetes.io/networking: "1" role.kubernetes.io/networking: "1"
annotations: annotations:
prometheus.io/scrape: "true"
scheduler.alpha.kubernetes.io/critical-pod: '' scheduler.alpha.kubernetes.io/critical-pod: ''
spec: spec:
containers: containers:
@ -146,6 +147,9 @@ spec:
key: network-password key: network-password
{{- end }} {{- end }}
image: 'weaveworks/weave-kube:2.3.0' image: 'weaveworks/weave-kube:2.3.0'
ports:
- name: metrics
containerPort: 6782
readinessProbe: readinessProbe:
httpGet: httpGet:
host: 127.0.0.1 host: 127.0.0.1
@ -182,6 +186,9 @@ spec:
apiVersion: v1 apiVersion: v1
fieldPath: spec.nodeName fieldPath: spec.nodeName
image: 'weaveworks/weave-npc:2.3.0' image: 'weaveworks/weave-npc:2.3.0'
ports:
- name: metrics
containerPort: 6781
resources: resources:
requests: requests:
cpu: 50m cpu: 50m

View File

@ -126,6 +126,7 @@ spec:
name: weave-net name: weave-net
role.kubernetes.io/networking: "1" role.kubernetes.io/networking: "1"
annotations: annotations:
prometheus.io/scrape: "true"
scheduler.alpha.kubernetes.io/critical-pod: '' scheduler.alpha.kubernetes.io/critical-pod: ''
spec: spec:
containers: containers:
@ -156,6 +157,9 @@ spec:
key: network-password key: network-password
{{- end }} {{- end }}
image: 'weaveworks/weave-kube:2.5.1' image: 'weaveworks/weave-kube:2.5.1'
ports:
- name: metrics
containerPort: 6782
readinessProbe: readinessProbe:
httpGet: httpGet:
host: 127.0.0.1 host: 127.0.0.1
@ -193,6 +197,9 @@ spec:
apiVersion: v1 apiVersion: v1
fieldPath: spec.nodeName fieldPath: spec.nodeName
image: 'weaveworks/weave-npc:2.5.1' image: 'weaveworks/weave-npc:2.5.1'
ports:
- name: metrics
containerPort: 6781
resources: resources:
requests: requests:
cpu: 50m cpu: 50m

View File

@ -126,6 +126,7 @@ spec:
name: weave-net name: weave-net
role.kubernetes.io/networking: "1" role.kubernetes.io/networking: "1"
annotations: annotations:
prometheus.io/scrape: "true"
scheduler.alpha.kubernetes.io/critical-pod: '' scheduler.alpha.kubernetes.io/critical-pod: ''
spec: spec:
containers: containers:
@ -160,6 +161,9 @@ spec:
key: network-password key: network-password
{{- end }} {{- end }}
image: 'weaveworks/weave-kube:2.5.1' image: 'weaveworks/weave-kube:2.5.1'
ports:
- name: metrics
containerPort: 6782
readinessProbe: readinessProbe:
httpGet: httpGet:
host: 127.0.0.1 host: 127.0.0.1
@ -197,6 +201,9 @@ spec:
apiVersion: v1 apiVersion: v1
fieldPath: spec.nodeName fieldPath: spec.nodeName
image: 'weaveworks/weave-npc:2.5.1' image: 'weaveworks/weave-npc:2.5.1'
ports:
- name: metrics
containerPort: 6781
resources: resources:
requests: requests:
cpu: 50m cpu: 50m

View File

@ -19,6 +19,7 @@ spec:
template: template:
metadata: metadata:
annotations: annotations:
prometheus.io/scrape: "true"
scheduler.alpha.kubernetes.io/critical-pod: '' scheduler.alpha.kubernetes.io/critical-pod: ''
scheduler.alpha.kubernetes.io/tolerations: >- scheduler.alpha.kubernetes.io/tolerations: >-
[{"key":"dedicated","operator":"Equal","value":"master","effect":"NoSchedule"},{"key":"CriticalAddonsOnly", "operator":"Exists"}] [{"key":"dedicated","operator":"Equal","value":"master","effect":"NoSchedule"},{"key":"CriticalAddonsOnly", "operator":"Exists"}]
@ -47,6 +48,9 @@ spec:
value: "{{ .Networking.Weave.ConnLimit }}" value: "{{ .Networking.Weave.ConnLimit }}"
{{- end }} {{- end }}
image: 'weaveworks/weave-kube:2.3.0' image: 'weaveworks/weave-kube:2.3.0'
ports:
- name: metrics
containerPort: 6782
livenessProbe: livenessProbe:
httpGet: httpGet:
host: 127.0.0.1 host: 127.0.0.1
@ -84,6 +88,9 @@ spec:
apiVersion: v1 apiVersion: v1
fieldPath: spec.nodeName fieldPath: spec.nodeName
image: 'weaveworks/weave-npc:2.3.0' image: 'weaveworks/weave-npc:2.3.0'
ports:
- name: metrics
containerPort: 6781
resources: resources:
requests: requests:
cpu: 50m cpu: 50m