Skip to content

Commit

Permalink
fix some items
Browse files Browse the repository at this point in the history
  • Loading branch information
Maven35 committed May 18, 2024
1 parent 846dea6 commit 4c0d471
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/kube-state-metrics/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ kind: ClusterRole
metadata:
labels:
{{- include "kube-state-metrics.labels" $ | indent 4 }}
name: {{ template "kube-state-metrics.fullname" $ }}
name: {{ include "kube-state-metrics.clusterRoleName" . }}
{{- if eq $.Values.rbac.useClusterRole false }}
namespace: {{ . }}
{{- end }}
Expand Down
4 changes: 2 additions & 2 deletions charts/kube-state-metrics/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ kind: RoleBinding
metadata:
labels:
{{- include "kube-state-metrics.labels" $ | indent 4 }}
name: {{ template "kube-state-metrics.fullname" $ }}
name: {{ include "kube-state-metrics.clusterRoleName" . }}
namespace: {{ . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
{{- if (not $.Values.rbac.useExistingRole) }}
name: {{ template "kube-state-metrics.fullname" $ }}
name: {{ include "kube-state-metrics.clusterRoleName" . }}
{{- else }}
name: {{ $.Values.rbac.useExistingRole }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/kube-state-metrics/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ rbac:
# If set to false - Run without Cluteradmin privs needed - ONLY works if namespace is also set (if useExistingRole is set this name is used as ClusterRole or Role to bind to)
useClusterRole: true

## If set it will override prometheus.server.fullname value for ClusterRole and ClusterRoleBinding
## If set it will override kube-state-metrics.fullname value for ClusterRole and ClusterRoleBinding, will also override Role and Rolebinding names if useClusterRole is false.
##
clusterRoleNameOverride: ""

Expand Down

0 comments on commit 4c0d471

Please sign in to comment.