Skip to content

Commit d697dd4

Browse files
committed
Allow kube-state-metrics PodDisruptionBudget metrics
* Update kube-state-metrics ClusterRole to allow collecting poddisruptionbudget metrics (exported as kube_poddisruptionbudget_*) * kubernetes/kube-state-metrics#551 * Bump addon-resizer from v1.7 to v1.8.4
1 parent 2f3097e commit d697dd4

File tree

5 files changed

+60
-18
lines changed

5 files changed

+60
-18
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Notable changes between versions.
1818
* Update nginx-ingress from v0.21.0 to v0.22.0
1919
* Update Prometheus from v2.6.0 to v2.6.1
2020
* Update kube-state-metrics from v1.4.0 to v1.5.0
21+
* Fix ClusterRole to collect and export PodDisruptionBudget metrics ([#383](https://github.com/poseidon/typhoon/pull/383))
2122
* Update Grafana from v5.4.2 to v5.4.3
2223

2324
## v1.13.2

addons/prometheus/exporters/kube-state-metrics/cluster-role.yaml

+35-10
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ kind: ClusterRole
33
metadata:
44
name: kube-state-metrics
55
rules:
6-
- apiGroups: [""]
6+
- apiGroups:
7+
- ""
78
resources:
89
- configmaps
910
- secrets
@@ -17,23 +18,47 @@ rules:
1718
- persistentvolumes
1819
- namespaces
1920
- endpoints
20-
verbs: ["list", "watch"]
21-
- apiGroups: ["extensions"]
21+
verbs:
22+
- list
23+
- watch
24+
- apiGroups:
25+
- extensions
2226
resources:
2327
- daemonsets
2428
- deployments
2529
- replicasets
26-
verbs: ["list", "watch"]
27-
- apiGroups: ["apps"]
30+
verbs:
31+
- list
32+
- watch
33+
- apiGroups:
34+
- apps
2835
resources:
2936
- statefulsets
30-
verbs: ["list", "watch"]
31-
- apiGroups: ["batch"]
37+
- daemonsets
38+
- deployments
39+
- replicasets
40+
verbs:
41+
- list
42+
- watch
43+
- apiGroups:
44+
- batch
3245
resources:
3346
- cronjobs
3447
- jobs
35-
verbs: ["list", "watch"]
36-
- apiGroups: ["autoscaling"]
48+
verbs:
49+
- list
50+
- watch
51+
- apiGroups:
52+
- autoscaling
3753
resources:
3854
- horizontalpodautoscalers
39-
verbs: ["list", "watch"]
55+
verbs:
56+
- list
57+
- watch
58+
- apiGroups:
59+
- policy
60+
resources:
61+
- poddisruptionbudgets
62+
verbs:
63+
- list
64+
- watch

addons/prometheus/exporters/kube-state-metrics/deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ spec:
3535
initialDelaySeconds: 5
3636
timeoutSeconds: 5
3737
- name: addon-resizer
38-
image: k8s.gcr.io/addon-resizer:1.7
38+
image: k8s.gcr.io/addon-resizer:1.8.4
3939
resources:
4040
limits:
4141
cpu: 100m

addons/prometheus/exporters/kube-state-metrics/resizer-role-binding.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
roleRef:
77
apiGroup: rbac.authorization.k8s.io
88
kind: Role
9-
name: kube-state-metrics-resizer
9+
name: kube-state-metrics
1010
subjects:
1111
- kind: ServiceAccount
1212
name: kube-state-metrics
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,31 @@
11
apiVersion: rbac.authorization.k8s.io/v1
22
kind: Role
33
metadata:
4-
name: kube-state-metrics-resizer
4+
name: kube-state-metrics
55
namespace: monitoring
66
rules:
7-
- apiGroups: [""]
7+
- apiGroups:
8+
- ""
89
resources:
910
- pods
10-
verbs: ["get"]
11-
- apiGroups: ["extensions"]
11+
verbs:
12+
- get
13+
- apiGroups:
14+
- extensions
1215
resources:
1316
- deployments
14-
resourceNames: ["kube-state-metrics"]
15-
verbs: ["get", "update"]
17+
resourceNames:
18+
- kube-state-metrics
19+
verbs:
20+
- get
21+
- update
22+
- apiGroups:
23+
- apps
24+
resources:
25+
- deployments
26+
resourceNames:
27+
- kube-state-metrics
28+
verbs:
29+
- get
30+
- update
31+

0 commit comments

Comments
 (0)