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..82eab94b1db6 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