diff --git a/CHANGES.md b/CHANGES.md index dfa98af8..c5f543e6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -18,6 +18,7 @@ Notable changes between versions. * Update nginx-ingress from v0.21.0 to v0.22.0 * Update Prometheus from v2.6.0 to v2.6.1 * Update kube-state-metrics from v1.4.0 to v1.5.0 + * Fix ClusterRole to collect and export PodDisruptionBudget metrics ([#383](https://github.com/poseidon/typhoon/pull/383)) * Update Grafana from v5.4.2 to v5.4.3 ## v1.13.2 diff --git a/addons/prometheus/exporters/kube-state-metrics/cluster-role.yaml b/addons/prometheus/exporters/kube-state-metrics/cluster-role.yaml index edb3bdf9..1b3f2cde 100644 --- a/addons/prometheus/exporters/kube-state-metrics/cluster-role.yaml +++ b/addons/prometheus/exporters/kube-state-metrics/cluster-role.yaml @@ -3,7 +3,8 @@ kind: ClusterRole metadata: name: kube-state-metrics rules: -- apiGroups: [""] +- apiGroups: + - "" resources: - configmaps - secrets @@ -17,23 +18,47 @@ rules: - persistentvolumes - namespaces - endpoints - verbs: ["list", "watch"] -- apiGroups: ["extensions"] + verbs: + - list + - watch +- apiGroups: + - extensions resources: - daemonsets - deployments - replicasets - verbs: ["list", "watch"] -- apiGroups: ["apps"] + verbs: + - list + - watch +- apiGroups: + - apps resources: - statefulsets - verbs: ["list", "watch"] -- apiGroups: ["batch"] + - daemonsets + - deployments + - replicasets + verbs: + - list + - watch +- apiGroups: + - batch resources: - cronjobs - jobs - verbs: ["list", "watch"] -- apiGroups: ["autoscaling"] + verbs: + - list + - watch +- apiGroups: + - autoscaling resources: - horizontalpodautoscalers - verbs: ["list", "watch"] + verbs: + - list + - watch +- apiGroups: + - policy + resources: + - poddisruptionbudgets + verbs: + - list + - watch diff --git a/addons/prometheus/exporters/kube-state-metrics/deployment.yaml b/addons/prometheus/exporters/kube-state-metrics/deployment.yaml index 4e015892..598b0f57 100644 --- a/addons/prometheus/exporters/kube-state-metrics/deployment.yaml +++ b/addons/prometheus/exporters/kube-state-metrics/deployment.yaml @@ -35,7 +35,7 @@ spec: initialDelaySeconds: 5 timeoutSeconds: 5 - name: addon-resizer - image: k8s.gcr.io/addon-resizer:1.7 + image: k8s.gcr.io/addon-resizer:1.8.4 resources: limits: cpu: 100m diff --git a/addons/prometheus/exporters/kube-state-metrics/resizer-role-binding.yaml b/addons/prometheus/exporters/kube-state-metrics/resizer-role-binding.yaml index 656e3db6..f10a2bcc 100644 --- a/addons/prometheus/exporters/kube-state-metrics/resizer-role-binding.yaml +++ b/addons/prometheus/exporters/kube-state-metrics/resizer-role-binding.yaml @@ -6,7 +6,7 @@ metadata: roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: kube-state-metrics-resizer + name: kube-state-metrics subjects: - kind: ServiceAccount name: kube-state-metrics diff --git a/addons/prometheus/exporters/kube-state-metrics/resizer-role.yaml b/addons/prometheus/exporters/kube-state-metrics/resizer-role.yaml index 49746064..6d12b57c 100644 --- a/addons/prometheus/exporters/kube-state-metrics/resizer-role.yaml +++ b/addons/prometheus/exporters/kube-state-metrics/resizer-role.yaml @@ -1,15 +1,31 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: kube-state-metrics-resizer + name: kube-state-metrics namespace: monitoring rules: -- apiGroups: [""] +- apiGroups: + - "" resources: - pods - verbs: ["get"] -- apiGroups: ["extensions"] + verbs: + - get +- apiGroups: + - extensions resources: - deployments - resourceNames: ["kube-state-metrics"] - verbs: ["get", "update"] + resourceNames: + - kube-state-metrics + verbs: + - get + - update +- apiGroups: + - apps + resources: + - deployments + resourceNames: + - kube-state-metrics + verbs: + - get + - update +