From dba42d347749d1e058683e3d67840de94bf9be64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Assad?= Date: Thu, 9 Jan 2020 15:12:59 -0300 Subject: [PATCH 1/2] jsonnet/kube-prometheus/kube-state-metrics: add missing clusterRole permissions --- .../kube-state-metrics.libsonnet | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/jsonnet/kube-prometheus/kube-state-metrics/kube-state-metrics.libsonnet b/jsonnet/kube-prometheus/kube-state-metrics/kube-state-metrics.libsonnet index bbce6bd6..1d2c2df4 100644 --- a/jsonnet/kube-prometheus/kube-state-metrics/kube-state-metrics.libsonnet +++ b/jsonnet/kube-prometheus/kube-state-metrics/kube-state-metrics.libsonnet @@ -122,6 +122,22 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; rulesType.withApiGroups(['storage.k8s.io']) + rulesType.withResources([ 'storageclasses', + 'volumeattachments', + ]) + + rulesType.withVerbs(['list', 'watch']), + + rulesType.new() + + rulesType.withApiGroups(['admissionregistration.k8s.io']) + + rulesType.withResources([ + 'validatingwebhookconfigurations', + 'mutatingwebhookconfigurations', + ]) + + rulesType.withVerbs(['list', 'watch']), + + rulesType.new() + + rulesType.withApiGroups(['networking.k8s.io']) + + rulesType.withResources([ + 'networkpolicies', ]) + rulesType.withVerbs(['list', 'watch']), ]; From d40548d3a051addcd80e9d3c62bad80814a8c390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Assad?= Date: Thu, 9 Jan 2020 15:24:50 -0300 Subject: [PATCH 2/2] manifests: Regenerate manifests --- manifests/kube-state-metrics-clusterRole.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/manifests/kube-state-metrics-clusterRole.yaml b/manifests/kube-state-metrics-clusterRole.yaml index a0722c70..6b3918f4 100644 --- a/manifests/kube-state-metrics-clusterRole.yaml +++ b/manifests/kube-state-metrics-clusterRole.yaml @@ -86,6 +86,22 @@ rules: - storage.k8s.io resources: - storageclasses + - volumeattachments + verbs: + - list + - watch +- apiGroups: + - admissionregistration.k8s.io + resources: + - validatingwebhookconfigurations + - mutatingwebhookconfigurations + verbs: + - list + - watch +- apiGroups: + - networking.k8s.io + resources: + - networkpolicies verbs: - list - watch