From 95d8d04d3327d94e24e7ac45b552e21fe1ff379c Mon Sep 17 00:00:00 2001 From: Mao-Hsiang Lien <6195019+titanlien@users.noreply.github.com> Date: Tue, 31 Oct 2023 10:19:09 +0100 Subject: [PATCH] [prometheus-adapter] Make customer.meterics cluster-role user settable Signed-off-by: Mao-Hsiang Lien <6195019+titanlien@users.noreply.github.com> --- .../templates/custom-metrics-cluster-role.yaml | 2 +- charts/prometheus-adapter/values.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/prometheus-adapter/templates/custom-metrics-cluster-role.yaml b/charts/prometheus-adapter/templates/custom-metrics-cluster-role.yaml index 4aa15ffe9916..f441e1bdb6fe 100644 --- a/charts/prometheus-adapter/templates/custom-metrics-cluster-role.yaml +++ b/charts/prometheus-adapter/templates/custom-metrics-cluster-role.yaml @@ -12,6 +12,6 @@ metadata: rules: - apiGroups: - custom.metrics.k8s.io - resources: ["*"] + resources: {{ toYaml .Values.rbac.customMetrics.resources | nindent 2 }} verbs: ["*"] {{- end -}} diff --git a/charts/prometheus-adapter/values.yaml b/charts/prometheus-adapter/values.yaml index 82eab94b1db6..695490b15611 100644 --- a/charts/prometheus-adapter/values.yaml +++ b/charts/prometheus-adapter/values.yaml @@ -60,6 +60,8 @@ rbac: create: true externalMetrics: resources: ["*"] + customMetrics: + resources: ["*"] psp: # Specifies whether PSP resources should be created