diff --git a/charts/unifi/Chart.yaml b/charts/unifi/Chart.yaml index 4e359b0e..a3384c87 100644 --- a/charts/unifi/Chart.yaml +++ b/charts/unifi/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 5.12.35 description: Ubiquiti Network's Unifi Controller name: unifi -version: 0.7.0 +version: 0.8.0 keywords: - ubiquiti - unifi diff --git a/charts/unifi/README.md b/charts/unifi/README.md index a0a573fc..804fb605 100644 --- a/charts/unifi/README.md +++ b/charts/unifi/README.md @@ -111,6 +111,7 @@ The following tables lists the configurable parameters of the Unifi chart and th | `persistence.enabled` | `true` | Use persistent volume to store data | | `persistence.size` | `5Gi` | Size of persistent volume claim | | `persistence.existingClaim` | `nil` | Use an existing PVC to persist data | +| `persistence.subPath` | `` | Store data in a subdirectory of PV instead of at the root directory | | `persistence.storageClass` | `-` | Type of persistent volume claim | | `persistence.accessModes` | `[]` | Persistence access modes | | `extraConfigFiles` | `{}` | Dictionary containing files mounted to `/configmap` inside the pod (See [values.yaml](values.yaml) for examples) | diff --git a/charts/unifi/templates/deployment.yaml b/charts/unifi/templates/deployment.yaml index 067d6596..496624fc 100644 --- a/charts/unifi/templates/deployment.yaml +++ b/charts/unifi/templates/deployment.yaml @@ -104,16 +104,16 @@ spec: volumeMounts: - mountPath: /unifi/data name: unifi-data - subPath: data + subPath: {{ ternary "data" (printf "%s/%s" .Values.persistence.subPath "data") (empty .Values.persistence.subPath) }} - mountPath: /unifi/log name: unifi-data - subPath: log + subPath: {{ ternary "log" (printf "%s/%s" .Values.persistence.subPath "log") (empty .Values.persistence.subPath) }} - mountPath: /unifi/cert name: unifi-data - subPath: cert + subPath: {{ ternary "cert" (printf "%s/%s" .Values.persistence.subPath "cert") (empty .Values.persistence.subPath) }} - mountPath: /unifi/init.d name: unifi-data - subPath: init.d + subPath: {{ ternary "init.d" (printf "%s/%s" .Values.persistence.subPath "init.d") (empty .Values.persistence.subPath) }} {{- if .Values.extraConfigFiles }} - name: extra-config mountPath: /configmap diff --git a/charts/unifi/values.yaml b/charts/unifi/values.yaml index 7f79a97f..9edb427a 100644 --- a/charts/unifi/values.yaml +++ b/charts/unifi/values.yaml @@ -209,6 +209,9 @@ persistence: ## If you want to reuse an existing claim, you can pass the name of the PVC using ## the existingClaim variable # existingClaim: your-claim + # + ## Applies a prefix to the directories created by the unifi container + # subPath: unifi accessMode: ReadWriteOnce size: 5Gi