Run Lenses with additional mounted volumes

Question

How can I mount additional volumes in Lenses?

Answer

To mount a volume in Lenses you need to add a volume and a volume mount definitions in Lenses deployment.

For example, if the Persistent Volume Claim to mount was called lenses-plugins then you could add this snippet in the values.yaml file:

additionalVolumes:
  - name: lenses-plugins
    persistentVolumeClaim:
      claimName: lenses-plugins
additionalVolumeMounts:
  - name: lenses-plugins
    mountPath: "/data/plugins"


A sample definition to create the Persistent Volume Claim could be:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: lenses-plugins
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi