From 8126efff2467ed210e4b0461a9a9a581839341f7 Mon Sep 17 00:00:00 2001 From: Mao-Hsiang Lien <6195019+titanlien@users.noreply.github.com> Date: Mon, 30 Oct 2023 10:28:35 +0100 Subject: [PATCH 1/3] [prometheus-adapter] Bump chart version Signed-off-by: Mao-Hsiang Lien <6195019+titanlien@users.noreply.github.com> --- charts/prometheus-adapter/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/prometheus-adapter/Chart.yaml b/charts/prometheus-adapter/Chart.yaml index c9326246b5a..2532c89d1d6 100644 --- a/charts/prometheus-adapter/Chart.yaml +++ b/charts/prometheus-adapter/Chart.yaml @@ -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 From 3c94e3281ec660319221b0a436e6f2136fb661d9 Mon Sep 17 00:00:00 2001 From: Mao-Hsiang Lien <6195019+titanlien@users.noreply.github.com> Date: Tue, 31 Oct 2023 10:18:34 +0100 Subject: [PATCH 2/3] [prometheus-adapter] Make external.meterics cluster-role user settable Signed-off-by: Mao-Hsiang Lien <6195019+titanlien@users.noreply.github.com> --- .../templates/external-metrics-cluster-role.yaml | 3 +-- charts/prometheus-adapter/values.yaml | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/charts/prometheus-adapter/templates/external-metrics-cluster-role.yaml b/charts/prometheus-adapter/templates/external-metrics-cluster-role.yaml index 212ea78b25a..71783fd4b28 100644 --- a/charts/prometheus-adapter/templates/external-metrics-cluster-role.yaml +++ b/charts/prometheus-adapter/templates/external-metrics-cluster-role.yaml @@ -12,8 +12,7 @@ metadata: rules: - apiGroups: - "external.metrics.k8s.io" - resources: - - "*" + resources: {{ toYaml .Values.rbac.externalMetrics.resources | nindent 2 }} verbs: - list - get diff --git a/charts/prometheus-adapter/values.yaml b/charts/prometheus-adapter/values.yaml index 5098e69fa65..82eab94b1db 100644 --- a/charts/prometheus-adapter/values.yaml +++ b/charts/prometheus-adapter/values.yaml @@ -58,6 +58,8 @@ securityContext: rbac: # Specifies whether RBAC resources should be created create: true + externalMetrics: + resources: ["*"] psp: # Specifies whether PSP resources should be created 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 3/3] [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 4aa15ffe991..f441e1bdb6f 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 82eab94b1db..695490b1561 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