From 5be1dd36fbbfb95372af3155e249b5a4366bff5f Mon Sep 17 00:00:00 2001 From: Alex Harder <13860012+ChiefAlexander@users.noreply.github.com> Date: Thu, 20 Jun 2019 10:28:49 -0500 Subject: [PATCH] Add custom security capabilities to the daemonset (#14942) Signed-off-by: ChiefAlexander --- stable/metricbeat/Chart.yaml | 2 +- stable/metricbeat/README.md | 1 + stable/metricbeat/templates/daemonset.yaml | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/stable/metricbeat/Chart.yaml b/stable/metricbeat/Chart.yaml index dc55e283d2..40b109792c 100644 --- a/stable/metricbeat/Chart.yaml +++ b/stable/metricbeat/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 description: A Helm chart to collect Kubernetes logs with metricbeat icon: https://www.elastic.co/assets/blt47799dcdcf08438d/logo-elastic-beats-lt.svg name: metricbeat -version: 1.6.4 +version: 1.7.0 appVersion: 6.7.0 home: https://www.elastic.co/products/beats/metricbeat sources: diff --git a/stable/metricbeat/README.md b/stable/metricbeat/README.md index 37f5b8056b..02fbf904bb 100644 --- a/stable/metricbeat/README.md +++ b/stable/metricbeat/README.md @@ -61,6 +61,7 @@ The following table lists the configurable parameters of the metricbeat chart an | `daemonset.resources.requests.cpu` | CPU resource requests for daemonset | | | `daemonset.resources.limits.cpu` | CPU resource limits for daemonset | | | `daemonset.hostNetwork` | Leverage host network interfaces | `true` | +| `daemonset.capabilities` | Add security capabilities to the daemonset | `[]` | | `daemonset.dnsPolicy` | Pod DNS Policy | `ClusterFirstWithHostNet` | | `deployment.enabled` | If true, enable deployment | | | `deployment.args` | Custom arguments for the docker command | | diff --git a/stable/metricbeat/templates/daemonset.yaml b/stable/metricbeat/templates/daemonset.yaml index fa04f4d78c..56c2733919 100644 --- a/stable/metricbeat/templates/daemonset.yaml +++ b/stable/metricbeat/templates/daemonset.yaml @@ -65,6 +65,11 @@ spec: {{- end }} securityContext: runAsUser: 0 +{{- if .Values.daemonset.capabilities }} + capabilities: + add: +{{ toYaml .Values.daemonset.capabilities | indent 12 }} +{{- end }} resources: {{- if .Values.daemonset.resources }} {{ toYaml .Values.daemonset.resources | indent 10 }}