From 8a7fe72ea69815f9ca651dfe6f92fdade29b8988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Iwi=C5=84ski?= Date: Mon, 8 Jun 2020 14:09:48 +0200 Subject: [PATCH] [stable/unifi] adding functionality to mount extra volumes (#22702) * [stable/unifi] adding functionality to mount extra volumes This change adds possibility to specify additional volumes when deploying Unifi controller. Signed-off-by: Marcin Iwinski * fixing defaults in README.md Signed-off-by: Marcin Iwinski * [stable/unifi] bumping version to 0.9.0 Signed-off-by: Marcin Iwinski --- charts/unifi/Chart.yaml | 2 +- charts/unifi/README.md | 2 ++ charts/unifi/templates/deployment.yaml | 2 ++ charts/unifi/values.yaml | 12 ++++++++++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/charts/unifi/Chart.yaml b/charts/unifi/Chart.yaml index 3bbc68b1..de7ba11a 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.8.1 +version: 0.9.0 keywords: - ubiquiti - unifi diff --git a/charts/unifi/README.md b/charts/unifi/README.md index 45a6bf0f..5d6eaa2d 100644 --- a/charts/unifi/README.md +++ b/charts/unifi/README.md @@ -114,6 +114,8 @@ The following tables lists the configurable parameters of the Unifi chart and th | `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 | +| `extraVolumes` | `[]` | Additional volumes to be used by extraVolumeMounts | +| `extraVolumeMounts` | `[]` | Additional volume mounts to be mounted in unifi container | | `persistence.accessModes` | `[]` | Persistence access modes | | `extraConfigFiles` | `{}` | Dictionary containing files mounted to `/configmap` inside the pod (See [values.yaml](values.yaml) for examples) | | `extraJvmOpts` | `[]` | List of additional JVM options, e.g. `["-Dlog4j.configurationFile=file:/configmap/log4j2.xml"]` | diff --git a/charts/unifi/templates/deployment.yaml b/charts/unifi/templates/deployment.yaml index 37727c42..4f7753d8 100644 --- a/charts/unifi/templates/deployment.yaml +++ b/charts/unifi/templates/deployment.yaml @@ -130,6 +130,7 @@ spec: - name: extra-config mountPath: /configmap {{- end }} + {{- if .Values.extraVolumeMounts }}{{ toYaml .Values.extraVolumeMounts | trim | nindent 12 }}{{ end }} resources: {{ toYaml .Values.resources | indent 12 }} volumes: @@ -150,6 +151,7 @@ spec: secret: secretName: "{{ .Values.customCert.certSecret }}" {{- end }} + {{- if .Values.extraVolumes }}{{ toYaml .Values.extraVolumes | trim | nindent 8 }}{{ end }} {{- with .Values.nodeSelector }} nodeSelector: {{ toYaml . | indent 8 }} diff --git a/charts/unifi/values.yaml b/charts/unifi/values.yaml index 6813e604..722977f5 100644 --- a/charts/unifi/values.yaml +++ b/charts/unifi/values.yaml @@ -218,6 +218,18 @@ persistence: accessMode: ReadWriteOnce size: 5Gi +extraVolumes: [] + ## specify additional volume to be used by extraVolumeMounts inside unifi container + # - name: additional-volume + # hostPath: + # path: /path/on/host + # type: DirectoryOrCreate + +extraVolumeMounts: [] + ## specify additional VolumeMount to be mounted inside unifi container + # - name: additional-volume + # mountPath: /path/in/container + extraJvmOpts: [] ## Extra java options ## Here are some examples of valid JVM options: