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

Commit

Permalink
Merge pull request #322 from pbecotte/FilebeatVolumes
Browse files Browse the repository at this point in the history
use a list for extra volume mounts to match the comments and other va…
  • Loading branch information
jmlrt authored Nov 21, 2019
2 parents a1dcddf + 04605dc commit aa5394a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
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 @@ -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` |
Expand Down
4 changes: 2 additions & 2 deletions filebeat/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}
4 changes: 2 additions & 2 deletions filebeat/tests/filebeat_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions filebeat/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}

Expand Down

0 comments on commit aa5394a

Please sign in to comment.