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

Commit

Permalink
[filebeat] Configurable ClusterRole (elastic#978)
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Mailleret <8582351+jmlrt@users.noreply.github.com>
  • Loading branch information
njgibbon and jmlrt committed Jan 5, 2021
1 parent a160dee commit 1ddc7f3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
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

0 comments on commit 1ddc7f3

Please sign in to comment.