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 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/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..695490b1561 100644 --- a/charts/prometheus-adapter/values.yaml +++ b/charts/prometheus-adapter/values.yaml @@ -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