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

[metricbeat] add missing rolebinding and cluster role rules #1603

Merged
merged 1 commit into from
Mar 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions metricbeat/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if .Values.managedServiceAccount }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ template "metricbeat.serviceAccount" . }}-role-binding
labels:
app: "{{ template "metricbeat.fullname" . }}"
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
roleRef:
kind: ClusterRole
name: {{ template "metricbeat.serviceAccount" . }}-role
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: {{ template "metricbeat.serviceAccount" . }}
namespace: {{ .Release.Namespace }}
{{- end -}}
13 changes: 10 additions & 3 deletions metricbeat/values.yaml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ clusterRoleRules:
- namespaces
- events
- pods
- services
verbs: ["get", "list", "watch"]
- apiGroups: ["extensions"]
resources:
Expand All @@ -259,10 +260,16 @@ clusterRoleRules:
resources:
- nodes/stats
verbs: ["get"]
- apiGroups: ["coordination.k8s.io"]
- apiGroups:
- ""
resources:
- leases
verbs: ["create", "get", "list", "update"]
- nodes/stats
verbs:
- get
- nonResourceURLs:
- "/metrics"
verbs:
- get

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