Skip to content

Commit

Permalink
[prometheus-adapter] allow customize clusterrole resources (prometheu…
Browse files Browse the repository at this point in the history
…s-community#3944)

Allow end user to change cluster role resources in external and custom metrics

Signed-off-by: Mao-Hsiang Lien <6195019+titanlien@users.noreply.github.com>
  • Loading branch information
titanlien authored and Matiasmct committed Mar 20, 2024
1 parent bbb10b7 commit 977b50b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/prometheus-adapter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: prometheus-adapter
version: 4.7.1
version: 4.8.0
appVersion: v0.11.1
description: A Helm chart for k8s prometheus adapter
home: https://github.com/kubernetes-sigs/prometheus-adapter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ metadata:
rules:
- apiGroups:
- custom.metrics.k8s.io
resources: ["*"]
resources: {{ toYaml .Values.rbac.customMetrics.resources | nindent 2 }}
verbs: ["*"]
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ metadata:
rules:
- apiGroups:
- "external.metrics.k8s.io"
resources:
- "*"
resources: {{ toYaml .Values.rbac.externalMetrics.resources | nindent 2 }}
verbs:
- list
- get
Expand Down
4 changes: 4 additions & 0 deletions charts/prometheus-adapter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ securityContext:
rbac:
# Specifies whether RBAC resources should be created
create: true
externalMetrics:
resources: ["*"]
customMetrics:
resources: ["*"]

psp:
# Specifies whether PSP resources should be created
Expand Down

0 comments on commit 977b50b

Please sign in to comment.