diff --git a/charts/prometheus-adapter/Chart.yaml b/charts/prometheus-adapter/Chart.yaml index c9326246b5a2..2532c89d1d69 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 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/templates/external-metrics-cluster-role.yaml b/charts/prometheus-adapter/templates/external-metrics-cluster-role.yaml index 212ea78b25aa..71783fd4b287 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 5098e69fa655..695490b15611 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