[stable/kube-state-metrics] Add missing permission for volumeattachments collector (#21079)

When enabling the volumeattachments collector, the following error is
logged without this permission:

Failed to list *v1.VolumeAttachment: volumeattachments.storage.k8s.io is forbidden: User "XXXXX:kube-state-metrics" cannot list resource "volumeattachments" in API group "storage.k8s.io" at the cluster scope

Signed-off-by: Fabrice Rabaute <fabrice@arista.com>
This commit is contained in:
Fabrice
2020-03-04 01:57:47 -08:00
committed by GitHub
parent bb0beb1cae
commit aa72a2849b
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ keywords:
- monitoring
- prometheus
- kubernetes
version: 2.7.1
version: 2.7.2
appVersion: 1.9.5
home: https://github.com/kubernetes/kube-state-metrics/
sources:
@@ -166,9 +166,9 @@ rules:
verbs: ["list", "watch"]
{{ end -}}
{{ if .Values.collectors.volumeattachments }}
- apiGroups: ["storageclasses.k8s.io"]
- apiGroups: ["storage.k8s.io"]
resources:
- storageclasses
- volumeattachments
verbs: ["list", "watch"]
{{ end -}}
{{ if .Values.collectors.verticalpodautoscalers }}