diff --git a/stable/metricbeat/Chart.yaml b/stable/metricbeat/Chart.yaml index 3f3ed1ed2a..7742439d3a 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.1 +version: 1.6.2 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 917cd3775f..117c1c55c5 100644 --- a/stable/metricbeat/README.md +++ b/stable/metricbeat/README.md @@ -43,6 +43,7 @@ The following table lists the configurable parameters of the metricbeat chart an | `plugins` | List of beat plugins | | | `extraEnv` | Additional environment | | | `extraVolumes`, `extraVolumeMounts` | Additional volumes and mounts, for example to provide other configuration files | | +| `extraSecrets` | Additional secrets for save private data | | | `resources.requests.cpu` | CPU resource requests | | | `resources.limits.cpu` | CPU resource limits | | | `resources.requests.memory` | Memory resource requests | | diff --git a/stable/metricbeat/templates/secret.yaml b/stable/metricbeat/templates/secret.yaml index 9d2c4399e4..928f0d4735 100644 --- a/stable/metricbeat/templates/secret.yaml +++ b/stable/metricbeat/templates/secret.yaml @@ -65,3 +65,20 @@ data: {{- end }} {{- end }} {{- end }} +{{- range $secret := .Values.extraSecrets }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ $secret.name }} + labels: + app: {{ template "metricbeat.name" . }} + chart: {{ template "metricbeat.chart" . }} + release: {{ $.Release.Name }} + heritage: {{ $.Release.Service }} +type: Opaque +data: + {{- range $key, $value := $secret.data }} + {{ $key }}: {{ $value | b64enc }} + {{- end }} +{{- end}} diff --git a/stable/metricbeat/values.yaml b/stable/metricbeat/values.yaml index 5094639e2c..a661090c2f 100644 --- a/stable/metricbeat/values.yaml +++ b/stable/metricbeat/values.yaml @@ -137,6 +137,16 @@ extraVolumeMounts: [] # - name: varlog # mountPath: /host/var/log # readOnly: true +extraSecrets: [] + # - name: ca-cert + # data: |- + # -----BEGIN CERTIFICATE----- + # ... + # -----END CERTIFICATE----- + # - name: userdata + # data: + # id: userid + # pw: userpassword resources: {} # We usually recommend not to specify default resources and to leave this as a conscious