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

Commit

Permalink
[metricbeat] Adding custerRole permissions for leader election (elast…
Browse files Browse the repository at this point in the history
…ic#1422)

* 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 committed Mar 3, 2022
1 parent 59791af commit e90ad3a
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 @@ -235,6 +235,10 @@ clusterRoleRules:
resources:
- nodes/stats
verbs: ["get"]
- apiGroups: ["coordination.k8s.io"]
resources:
- leases
verbs: ["create", "get", "list", "update"]

podAnnotations:
{}
Expand Down

0 comments on commit e90ad3a

Please sign in to comment.