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