Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
[metricbeat] Adding custerRole permissions for leader election (#1422)
Browse files Browse the repository at this point in the history
* Adding support to Ingress networking.k8s.io/v1

* Adjusting ES service name

* Removing ingress typo & adjusting python test

* Adjusting python tests to use the new ingress version

* fixing conflict

* Adding support to kubernetes ingress v1 & ClassName

* Adding reformatted files

* fixing conflict

* Adding ClassName & Pathtype on ingress settings

* Performing syntax adjustments and removing comments

* custerRole permissions for leader election in k8s 1.19+

* Adding fb & mb role

Co-authored-by: jmlrt <8582351+jmlrt@users.noreply.github.com>
  • Loading branch information
framsouza and jmlrt authored Mar 3, 2022
1 parent d8f17d2 commit 7fbeaa7
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
14 changes: 14 additions & 0 deletions filebeat/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.managedServiceAccount }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ template "filebeat.serviceAccount" . }}-role
labels:
app: "{{ template "filebeat.fullname" . }}"
rules:
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs: ["get", "create", "update"]
{{- end -}}
14 changes: 14 additions & 0 deletions metricbeat/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.managedServiceAccount }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ template "metricbeat.serviceAccount" . }}-role
labels:
app: "{{ template "metricbeat.fullname" . }}"
rules:
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs: ["get", "create", "update"]
{{- end -}}
4 changes: 4 additions & 0 deletions metricbeat/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ clusterRoleRules:
resources:
- nodes/stats
verbs: ["get"]
- apiGroups: ["coordination.k8s.io"]
resources:
- leases
verbs: ["create", "get", "list", "update"]

podAnnotations: {}
# iam.amazonaws.com/role: es-cluster
Expand Down

0 comments on commit 7fbeaa7

Please sign in to comment.