stable/unifi implements subPath functionality (#22432)

* unifi chart supports subPath for existing PVCs

Signed-off-by: James Choncholas <jchoncholas@gmail.com>

* bump version number

Signed-off-by: James Choncholas <jchoncholas@gmail.com>
This commit is contained in:
James Choncholas 2020-05-17 22:07:35 -04:00 committed by Jeff Billimek
parent 65abab892e
commit 576ff487df
No known key found for this signature in database
GPG Key ID: 214B3EF39B4956B7
4 changed files with 9 additions and 5 deletions

View File

@ -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

View File

@ -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) |

View File

@ -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

View File

@ -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