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

[filebeat] Configurable ClusterRole (#978) #1006

Merged
merged 1 commit into from
Jan 5, 2021
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
2 changes: 2 additions & 0 deletions filebeat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ as a reference. They are also used in the automated testing of this chart.

| Parameter | Description | Default |
|--------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| `clusterRoleRules` | Configurable [cluster role rules][] that Filebeat uses to access Kubernetes resources | see [values.yaml][] |
| `daemonset.annotations` | Configurable [annotations][] for filebeat daemonset | `{}` |
| `daemonset.labels` | Configurable [labels][] applied to all filebeat DaemonSet pods | `{}` |
| `daemonset.affinity` | Configurable [affinity][] for filebeat daemonset | `{}` |
Expand Down Expand Up @@ -228,6 +229,7 @@ about our development and testing process.
[CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md
[affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
[annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
[cluster role rules]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole
[dnsConfig]: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
[environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config
[environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables
Expand Down
12 changes: 1 addition & 11 deletions filebeat/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,5 @@ metadata:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
rules:
- apiGroups:
- ""
resources:
- namespaces
- nodes
- pods
verbs:
- get
- list
- watch
rules: {{ toYaml .Values.clusterRoleRules | nindent 2 -}}
{{- end -}}
12 changes: 12 additions & 0 deletions filebeat/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,18 @@ readinessProbe:
# Whether this chart should self-manage its service account, role, and associated role binding.
managedServiceAccount: true

clusterRoleRules:
- apiGroups:
- ""
resources:
- namespaces
- nodes
- pods
verbs:
- get
- list
- watch

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

Expand Down