kubernetes icon indicating copy to clipboard operation
kubernetes copied to clipboard

Support extraVolumes and extraVolumeMounts on db and app

Open crasx opened this issue 1 year ago • 1 comments

This PR introduces the ability to mount additional volumes in both the Firefly-DB deployment and backup jobs. This provides flexibility to attach custom storage solutions or configurations as needed.

  • Added extraVolumeMounts and extraVolumes to the templates and values.yaml file to enable custom volume definitions for both the database and backup containers.
  • Updated the PVC templates (firefly-db-pvc.yml, firefly-backup-pvc.yml) to include conditionals ensuring PVCs are only created when enabled and no existing claim is provided.

Example Usage

# Firefly III
firefly-iii:

  persistence:
    enabled: false
  extraVolumeMounts:
    - name: firefly-iii-volume
      mountPath: /var/www/html/storage/upload
  extraVolumes:
      - name: firefly-iii-volume
        hostPath:
          path: /home/firefly/storage/upload
          type: DirectoryOrCreate

# DB
firefly-db:
  storage:
    enabled: false

  extraVolumeMounts:
    - name: firefly-db-volume
      mountPath: /var/lib/mysql
  extraVolumes:
    - name: firefly-db-volume
      hostPath:
        path: /home/firefly/db
        type: DirectoryOrCreate
  backup:
    destination: "pvc"
    pvc:
      enabled: false
    extraVolumeMounts:
      - name: firefly-backup-volume
        mountPath: /var/lib/backup
    extraVolumes:
      - name: firefly-backup-volume
        hostPath:
          path: /home/firefly/db-backup
          type: DirectoryOrCreate

crasx avatar Jul 02 '24 01:07 crasx

Alright, I think you can update the minor version for this one. Did you test this, and does it work?

JC5 avatar Jul 03 '24 05:07 JC5