Skip to content

Commit a5c3356

Browse files
committed
Reorder cluster role API groups in kube-state-metrics.libsonnet
Put customresourcedefinitions first, and then the specific CRD types can come after that. Signed-off-by: Dan Winship <[email protected]>
1 parent 51f5244 commit a5c3356

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

assets/kube-state-metrics/cluster-role.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,17 @@ rules:
129129
- list
130130
- watch
131131
- apiGroups:
132-
- autoscaling.k8s.io
132+
- apiextensions.k8s.io
133133
resources:
134-
- verticalpodautoscalers
134+
- customresourcedefinitions
135135
verbs:
136+
- get
136137
- list
137138
- watch
138139
- apiGroups:
139-
- apiextensions.k8s.io
140+
- autoscaling.k8s.io
140141
resources:
141-
- customresourcedefinitions
142+
- verticalpodautoscalers
142143
verbs:
143-
- get
144144
- list
145145
- watch

jsonnet/components/kube-state-metrics.libsonnet

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,18 @@ function(params)
4242

4343
clusterRole+: {
4444
rules+: [
45-
{
46-
apiGroups: ['autoscaling.k8s.io'],
47-
resources: ['verticalpodautoscalers'],
48-
verbs: ['list', 'watch'],
49-
},
5045
// CRD read permissions are required for kube-state-metrics to support the CRS feature-set.
5146
// Refer: https://github.com/kubernetes/kube-state-metrics/pull/1851/files#diff-916e6863e1245c673b4e5965c98dc27bafbd72650fdb38ce65ea73ee6304e027R45-R47
5247
{
5348
apiGroups: ['apiextensions.k8s.io'],
5449
resources: ['customresourcedefinitions'],
5550
verbs: ['get', 'list', 'watch'],
5651
},
52+
{
53+
apiGroups: ['autoscaling.k8s.io'],
54+
resources: ['verticalpodautoscalers'],
55+
verbs: ['list', 'watch'],
56+
},
5757
],
5858
},
5959

manifests/0000_50_cluster-monitoring-operator_02-role.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -360,18 +360,18 @@ rules:
360360
- list
361361
- watch
362362
- apiGroups:
363-
- autoscaling.k8s.io
363+
- apiextensions.k8s.io
364364
resources:
365-
- verticalpodautoscalers
365+
- customresourcedefinitions
366366
verbs:
367+
- get
367368
- list
368369
- watch
369370
- apiGroups:
370-
- apiextensions.k8s.io
371+
- autoscaling.k8s.io
371372
resources:
372-
- customresourcedefinitions
373+
- verticalpodautoscalers
373374
verbs:
374-
- get
375375
- list
376376
- watch
377377
- apiGroups:

0 commit comments

Comments
 (0)