I am using the official Helm chart for Logstash.
I want to mount a volume using an existingClaim that has some dictionaries that will be used for translate filters across multiple Logstash instances.
How do I bring in the PVC I created called dictionary and have it mounted into
/usr/share/logstash/config/dic ?
Figured it out using the Extras using either a configmap or a PVC persistentVolumeClaim. It was hard to find specific examples of this so here is what works.
persistence:
enabled: false
annotations: {}
extraVolumeMounts:
- name: list
mountPath: "/usr/share/logstash/config/listings.yaml"
subPath: listings.yaml
readOnly: true
- name: dictionary
mountPath: "/usr/share/logstash/config/dictionary"
readOnly: true
extraVolumes:
- name: list
configMap:
name: listings
- name: dictionary
persistentVolumeClaim:
claimName: dictionary
You can also use the secretMount for a file in some cases.
secretMounts:
- name: querytemplate
secretName: querytemplate
path: /usr/share/logstash/config/scripts