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

use a list for extra volume mounts to match the comments and other va… #322

Merged
merged 1 commit into from
Nov 21, 2019
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ elastic-certificates.p12
*.pyc
index.yaml
*.tgz
.idea/
4 changes: 2 additions & 2 deletions filebeat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ helm install --name filebeat elastic/filebeat --set imageTag=7.4.0
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `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` |
| `image` | The Filebeat docker image | `docker.elastic.co/beats/filebeat` |
| `imageTag` | The Filebeat docker image tag | `7.4.0` |
Expand Down
4 changes: 2 additions & 2 deletions filebeat/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,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:
Expand Down Expand Up @@ -143,5 +143,5 @@ spec:
mountPath: /var/run/docker.sock
readOnly: true
{{- if .Values.extraVolumeMounts }}
{{ tpl .Values.extraVolumeMounts . | indent 8 }}
{{ toYaml .Values.extraVolumeMounts | indent 8 }}
{{- end }}
4 changes: 2 additions & 2 deletions filebeat/tests/filebeat_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,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
Expand Down
4 changes: 2 additions & 2 deletions filebeat/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,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: {}

Expand Down