owncloud-docker / helm-charts

ownCloud Server Helm charts
https://owncloud-docker.github.io/helm-charts/
Apache License 2.0
4 stars 11 forks source link

feat: added extraVolumes and extraVolumeMounts to owncloud deployment #67

Closed astromechza closed 10 months ago

astromechza commented 11 months ago

This PR helps to address #66 by adding support for extra volume mounts. This allows additional config maps or volumes to be mounted in order to add or extend behavior. In the case of #66, this can be used to mount in a config map for use with OWNCLOUD_PRE_CRONJOB_PATH to run additional background behavior.

Tests?

Manually tested by modifying the default values.yaml and rendering locally and inspecting both deployment and cronjob.

$ helm template example ./charts/owncloud -f charts/owncloud/values.yaml
...
          volumeMounts:
            - name: owncloud-data
              mountPath: /mnt/data
            - name: config-volume
              mountPath: /mnt/data/config/configmap.config.php
              subPath: configmap.config.php
            - mountPath: /super-secret
              name: extra-volume
      volumes:
        - name: owncloud-data
          persistentVolumeClaim:
            claimName: example-owncloud
        - name: config-volume
          secret:
            secretName: owncloud-config
        - name: extra-volume
          secret:
            secretName: super-secret-volume
...
xoxys commented 11 months ago

Thanks! To fix the docs issue, you can run make docs and commit the changes.

xoxys commented 11 months ago

Needs to be added to the cronjob as well https://github.com/owncloud-docker/helm-charts/blob/main/charts/owncloud/templates/cronjob.yaml#L41

astromechza commented 11 months ago

Done and done 👍