diff --git a/.gitignore b/.gitignore index b88248453..beeb2f712 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ elastic-certificates.p12 *.pyc index.yaml *.tgz +.idea/ diff --git a/filebeat/README.md b/filebeat/README.md index 0248cca96..9753667ff 100644 --- a/filebeat/README.md +++ b/filebeat/README.md @@ -59,8 +59,8 @@ helm install --name filebeat elastic/filebeat --set imageTag=7.4.1 | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | `filebeatConfig` | Allows you to add any config files in `/usr/share/filebeat` such as `filebeat.yml`. See [values.yaml](./values.yaml) for an example of the formatting with the default configuration. | see [values.yaml](./values.yaml) | | `extraEnvs` | Extra [environment variables](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config) which will be appended to the `env:` definition for the container | `[]` | -| `extraVolumeMounts` | Templatable string of additional volumeMounts to be passed to the `tpl` function | `""` | -| `extraVolumes` | Templatable string of additional volumes to be passed to the `tpl` function | `""` | +| `extraVolumeMounts` | List of additional volumeMounts to be mounted on the Daemonset | `""` | +| `extraVolumes` | List of additional volumes to be mounted on the Daemonset | `""` | | `hostPathRoot` | Fully-qualified [hostPath](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath) that will be used to persist Filebeat registry data | `/var/lib` | | `hostNetworking` | Use host networking in the daemonset so that hostname is reported correctly | `image` | The Filebeat docker image | `docker.elastic.co/beats/filebeat` | diff --git a/filebeat/templates/daemonset.yaml b/filebeat/templates/daemonset.yaml index 3943c26b5..9a6a2f85c 100644 --- a/filebeat/templates/daemonset.yaml +++ b/filebeat/templates/daemonset.yaml @@ -76,7 +76,7 @@ spec: hostPath: path: /var/run/docker.sock {{- if .Values.extraVolumes }} -{{ tpl .Values.extraVolumes . | indent 6 }} +{{ toYaml .Values.extraVolumes | indent 6 }} {{- end }} {{- if .Values.imagePullSecrets }} imagePullSecrets: @@ -151,5 +151,5 @@ spec: mountPath: /var/run/docker.sock readOnly: true {{- if .Values.extraVolumeMounts }} -{{ tpl .Values.extraVolumeMounts . | indent 8 }} +{{ toYaml .Values.extraVolumeMounts | indent 8 }} {{- end }} diff --git a/filebeat/tests/filebeat_test.py b/filebeat/tests/filebeat_test.py index 971d7274f..78741bf72 100644 --- a/filebeat/tests/filebeat_test.py +++ b/filebeat/tests/filebeat_test.py @@ -180,10 +180,10 @@ def test_adding_a_secret_mount(): def test_adding_a_extra_volume_with_volume_mount(): config = ''' -extraVolumes: | +extraVolumes: - name: extras emptyDir: {} -extraVolumeMounts: | +extraVolumeMounts: - name: extras mountPath: /usr/share/extras readOnly: true diff --git a/filebeat/values.yaml b/filebeat/values.yaml index 6c16c2a44..55cb8e30f 100755 --- a/filebeat/values.yaml +++ b/filebeat/values.yaml @@ -22,12 +22,12 @@ extraEnvs: [] # - name: MY_ENVIRONMENT_VAR # value: the_value_goes_here -extraVolumeMounts: "" +extraVolumeMounts: [] # - name: extras # mountPath: /usr/share/extras # readOnly: true -extraVolumes: "" +extraVolumes: [] # - name: extras # emptyDir: {}