Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
[stable/kube-state-metrics] Fix STS role for Autosharding (#23210)
Browse files Browse the repository at this point in the history
Currently, Get, List and Watch are required. List and Watch are provided
by the ClusterRole related to collectors. The STS collector can be
disabled breaking the current AutoSharding role permissions.

Moreover, the resourceNames depends of the RELEASE_NAME as defined in
deployment.yaml so we need to reflect this or we won't have the correct
permission to read our STS.

Signed-off-by: Mathis Raguin <[email protected]>
  • Loading branch information
Sayrus authored Jul 17, 2020
1 parent e8cd9b7 commit b9d0ed2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stable/kube-state-metrics/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords:
- monitoring
- prometheus
- kubernetes
version: 2.8.11
version: 2.8.12
appVersion: 1.9.7
home: https://github.com/kubernetes/kube-state-metrics/
sources:
Expand Down
4 changes: 3 additions & 1 deletion stable/kube-state-metrics/templates/stsdiscovery-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ rules:
- apiGroups:
- apps
resourceNames:
- kube-state-metrics
- {{ template "kube-state-metrics.fullname" . }}
resources:
- statefulsets
verbs:
- get
- list
- watch
{{- end }}

0 comments on commit b9d0ed2

Please sign in to comment.