From 7afdc0d88facf80a26a3ec59bd4b273aa491e809 Mon Sep 17 00:00:00 2001 From: Peter Brachwitz Date: Sun, 6 Aug 2023 11:36:18 +0200 Subject: [PATCH] Add missing RBAC rules for *Beats as of 8.9.0 (#7081) (#7088) Fixes #7079 This was first reported in #6946 (comment) (cherry picked from commit d022e102012381073f5fdad0348bfd17f81cd53f) --- .../recipes/beats/filebeat_autodiscover.yaml | 14 ++++++++++ config/recipes/beats/stack_monitoring.yaml | 28 +++++++++++++++++++ .../elastic-agent/kubernetes-integration.yaml | 14 ++++++++++ 3 files changed, 56 insertions(+) diff --git a/config/recipes/beats/filebeat_autodiscover.yaml b/config/recipes/beats/filebeat_autodiscover.yaml index 466e688ea7..35f3a2de91 100644 --- a/config/recipes/beats/filebeat_autodiscover.yaml +++ b/config/recipes/beats/filebeat_autodiscover.yaml @@ -75,6 +75,20 @@ rules: - get - watch - list +- apiGroups: ["apps"] + resources: + - replicasets + verbs: + - get + - list + - watch +- apiGroups: ["batch"] + resources: + - jobs + verbs: + - get + - list + - watch --- apiVersion: v1 kind: ServiceAccount diff --git a/config/recipes/beats/stack_monitoring.yaml b/config/recipes/beats/stack_monitoring.yaml index 444aa04fc9..f1e1baecb7 100644 --- a/config/recipes/beats/stack_monitoring.yaml +++ b/config/recipes/beats/stack_monitoring.yaml @@ -91,6 +91,20 @@ rules: - get - watch - list +- apiGroups: ["apps"] + resources: + - replicasets + verbs: + - get + - list + - watch +- apiGroups: ["batch"] + resources: + - jobs + verbs: + - get + - list + - watch --- apiVersion: v1 kind: ServiceAccount @@ -190,6 +204,20 @@ rules: - get - watch - list +- apiGroups: ["apps"] + resources: + - replicasets + verbs: + - get + - list + - watch +- apiGroups: ["batch"] + resources: + - jobs + verbs: + - get + - list + - watch --- apiVersion: v1 kind: ServiceAccount diff --git a/config/recipes/elastic-agent/kubernetes-integration.yaml b/config/recipes/elastic-agent/kubernetes-integration.yaml index 21bcd923a3..e9f3542632 100644 --- a/config/recipes/elastic-agent/kubernetes-integration.yaml +++ b/config/recipes/elastic-agent/kubernetes-integration.yaml @@ -154,6 +154,20 @@ rules: - get - create - update +- apiGroups: ["apps"] + resources: + - replicasets + verbs: + - get + - list + - watch +- apiGroups: ["batch"] + resources: + - jobs + verbs: + - get + - list + - watch --- apiVersion: v1 kind: ServiceAccount