diff --git a/charts/pixelfed/README.md b/charts/pixelfed/README.md index eceeed6..ef38624 100644 --- a/charts/pixelfed/README.md +++ b/charts/pixelfed/README.md @@ -78,9 +78,11 @@ A Helm chart for deploying Pixelfed on Kubernetes | mariadb.enabled | bool | `false` | enable mariadb subchart - currently experimental for this chart read more about the values: https://github.com/bitnami/charts/tree/main/bitnami/mariadb | | nameOverride | string | `""` | This is to override the chart name. | | nodeSelector | object | `{}` | put the pixelfed pod on a specific node/nodegroup | +| persistence.accessModes | list | `["ReadWriteOnce"]` | accessMode | | persistence.enabled | bool | `false` | enable persistence for the pixelfed pod | | persistence.existingClaim | string | `""` | using an existing PVC instead of creating one with this chart | | persistence.storage | string | `"2Gi"` | size of the persistent volume claim to create. Tgnored if persistence.existingClaim is set | +| persistence.storageClassName | string | `""` | storage class name | | phpConfigs | object | `{}` | PHP Configuration files Will be injected in /usr/local/etc/php-fpm.d | | pixelfed.account_deletion | bool | `true` | Enable account deletion (may be a requirement in some jurisdictions) | | pixelfed.activity_pub.enabled | bool | `false` | enable ActivityPub | diff --git a/charts/pixelfed/templates/deployment.yaml b/charts/pixelfed/templates/deployment.yaml index b2e8ed5..6dc4154 100644 --- a/charts/pixelfed/templates/deployment.yaml +++ b/charts/pixelfed/templates/deployment.yaml @@ -282,8 +282,12 @@ spec: {{- end }} {{- if .Values.persistence.enabled }} - name: storage - persistentVolumeclaim: + persistentVolumeClaim: + {{- if .Values.persistence.existingClaim }} claimName: {{ .Values.persistence.existingClaim }} + {{- else }} + claimName: {{ include "pixelfed.fullname" . }} + {{- end }} {{- end }} {{- if .Values.phpConfigs }} - name: phpconfig diff --git a/charts/pixelfed/templates/pvc.yaml b/charts/pixelfed/templates/pvc.yaml index 3413f41..fa34630 100644 --- a/charts/pixelfed/templates/pvc.yaml +++ b/charts/pixelfed/templates/pvc.yaml @@ -5,8 +5,9 @@ apiVersion: v1 metadata: name: {{ include "pixelfed.fullname" . }} spec: + storageClassName: {{ .Values.persistence.storageClassName }} accessModes: - - ReadWriteOnce + {{- toYaml .Values.persistence.accessModes | indent 4 }} resources: requests: storage: {{ .Values.persistence.storage }} diff --git a/charts/pixelfed/values.yaml b/charts/pixelfed/values.yaml index efc1ca6..906729a 100644 --- a/charts/pixelfed/values.yaml +++ b/charts/pixelfed/values.yaml @@ -309,8 +309,13 @@ phpConfigs: {} persistence: # -- enable persistence for the pixelfed pod enabled: false + # -- storage class name + storageClassName: "" # -- size of the persistent volume claim to create. Tgnored if persistence.existingClaim is set storage: 2Gi + # -- accessMode + accessModes: + - ReadWriteOnce # -- using an existing PVC instead of creating one with this chart existingClaim: ""