From 4cbe828448d7852406601764663f694e19929519 Mon Sep 17 00:00:00 2001 From: Jacob Block Date: Sat, 22 Dec 2018 08:18:27 -0600 Subject: [PATCH] [stable/unifi] Add UID and GID options. (#10218) Signed-off-by: Jacob Block --- charts/unifi/Chart.yaml | 2 +- charts/unifi/README.md | 2 ++ charts/unifi/templates/deployment.yaml | 4 ++++ charts/unifi/values.yaml | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/charts/unifi/Chart.yaml b/charts/unifi/Chart.yaml index 0d923822..1fbc059f 100644 --- a/charts/unifi/Chart.yaml +++ b/charts/unifi/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 5.9.29 description: Ubiquiti Network's Unifi Controller name: unifi -version: 0.2.3 +version: 0.2.4 keywords: - ubiquiti - unifi diff --git a/charts/unifi/README.md b/charts/unifi/README.md index 599ff38e..90b09bfb 100644 --- a/charts/unifi/README.md +++ b/charts/unifi/README.md @@ -75,6 +75,8 @@ The following tables lists the configurable parameters of the Sentry chart and t | `ingress.tls` | Ingress TLS configuration | `[]` | | `timezone` | Timezone the Unifi controller should run as, e.g. 'America/New York' | `UTC` | | `runAsRoot` | Run the controller as UID0 (root user) | `false` | +| `UID` | Run the controller as user UID | `999` | +| `GID` | Run the controller as group GID | `999` | | `addSetfcap` | Give the controller container the SETFCAP capability; this is necessary when not running as root | `true` | | `mongodb.enabled` | Use external MongoDB for data storage | `false` | | `mongodb.dbUri` | external MongoDB URI | `mongodb://mongo/unifi` | diff --git a/charts/unifi/templates/deployment.yaml b/charts/unifi/templates/deployment.yaml index 35485938..33dc6ed8 100644 --- a/charts/unifi/templates/deployment.yaml +++ b/charts/unifi/templates/deployment.yaml @@ -65,6 +65,10 @@ spec: value: "{{ .Values.timezone }}" - name: RUNAS_UID0 value: "{{ .Values.runAsRoot }}" + - name: UNIFI_UID + value: "{{ .Values.UID }}" + - name: UNIFI_GID + value: "{{ .Values.GID }}" {{- if .Values.mongodb.enabled }} - name: DB_URI value: "{{ .Values.mongodb.dbUri }}" diff --git a/charts/unifi/values.yaml b/charts/unifi/values.yaml index 51f00c89..a6bd34f6 100644 --- a/charts/unifi/values.yaml +++ b/charts/unifi/values.yaml @@ -110,6 +110,8 @@ timezone: UTC runAsRoot: false addSetfcap: true +UID: 999 +GID: 999 # define an external mongoDB instead of using the built-in mongodb mongodb: