From 757fc67c2525368c463008699b6ac74e1bce5b8c Mon Sep 17 00:00:00 2001 From: Abdelfattah Saafan Date: Wed, 22 Jan 2020 13:13:25 -0500 Subject: [PATCH] Add rbac replicasets to apps apigroup Metricbeat couldn't collect state_replicaset due to the missing RBAC role definition so replicasets was needed in apps apigroup. This change is based on: https://github.com/helm/charts/commit/122647b905c32c79690aba32d9c91e2831717e2d Change-Id: Id0be124971820ccf91735d3f40cdc75d96fa57d4 Closes-Bug: 1860532 Signed-off-by: Abdelfattah Saafan --- monitor-helm/centos/monitor-helm.spec | 2 ++ ...sets-to-apps-apigroup-commit-1717e2d.patch | 24 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 monitor-helm/files/0014-Add-rbac-replicasets-to-apps-apigroup-commit-1717e2d.patch diff --git a/monitor-helm/centos/monitor-helm.spec b/monitor-helm/centos/monitor-helm.spec index 3cb98e8..fdcf3f6 100644 --- a/monitor-helm/centos/monitor-helm.spec +++ b/monitor-helm/centos/monitor-helm.spec @@ -31,6 +31,7 @@ Patch10: 0010-Update-kube-state-metrics-1.8.0-to-commit-09daf19.patch Patch11: 0011-update-init-container-env-to-include-node-name.patch Patch12: 0012-Add-imagePullSecrets.patch Patch13: 0013-removed-unused-images.patch +Patch14: 0014-Add-rbac-replicasets-to-apps-apigroup-commit-1717e2d.patch BuildRequires: helm @@ -52,6 +53,7 @@ Monitor Helm charts %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 %build # initialize helm and build the toolkit diff --git a/monitor-helm/files/0014-Add-rbac-replicasets-to-apps-apigroup-commit-1717e2d.patch b/monitor-helm/files/0014-Add-rbac-replicasets-to-apps-apigroup-commit-1717e2d.patch new file mode 100644 index 0000000..3004aec --- /dev/null +++ b/monitor-helm/files/0014-Add-rbac-replicasets-to-apps-apigroup-commit-1717e2d.patch @@ -0,0 +1,24 @@ +From 6bed0291665738b2b1f9cdceff3eaaec46c9409f Mon Sep 17 00:00:00 2001 +From: Abdelfattah Saafan +Date: Wed, 22 Jan 2020 11:19:39 -0500 +Subject: [PATCH 1/1] add rbac replicasets to apps + +--- + stable/metricbeat/templates/clusterrole.yaml | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/stable/metricbeat/templates/clusterrole.yaml b/stable/metricbeat/templates/clusterrole.yaml +index 5ca886c..bd028fc 100644 +--- a/stable/metricbeat/templates/clusterrole.yaml ++++ b/stable/metricbeat/templates/clusterrole.yaml +@@ -30,6 +30,7 @@ rules: + resources: + - statefulsets + - deployments ++ - replicasets + verbs: ["get", "list", "watch"] + - apiGroups: [""] + resources: +-- +1.8.3.1 +