From 5c86431dd1f3298846e159b57852cf017b80f0b7 Mon Sep 17 00:00:00 2001 From: bp99 Date: Sun, 25 Aug 2024 23:49:44 +0200 Subject: [PATCH] chart-unifi_network_application: set PUID/PGID instead of runAsUser --- charts/unifi-network-application/README.md | 9 ++++++--- .../templates/deployment.yaml | 2 ++ charts/unifi-network-application/values.yaml | 18 ++++++++++++++---- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/charts/unifi-network-application/README.md b/charts/unifi-network-application/README.md index f660797..c03e10e 100644 --- a/charts/unifi-network-application/README.md +++ b/charts/unifi-network-application/README.md @@ -16,6 +16,7 @@ Unifi Controller application using linuxservers Docker image. This chart was or | Key | Type | Default | Description | |-----|------|---------|-------------| +| extraEnv | object | `{}` | set extra environment variables for the app | | fullnameOverride | string | `""` | can be used to override the main app name; incorporates release name by default | | global.storageClass | string | `""` | globally set the storage class for PVCs | | image.pullPolicy | string | `"IfNotPresent"` | | @@ -30,12 +31,13 @@ Unifi Controller application using linuxservers Docker image. This chart was or | mongodb.cacheSizeGB | string | `"0.25"` | | | mongodb.dbname | string | `"unifi"` | main database name | | mongodb.dbname_stat | string | `"unifi_stat"` | stat database name | +| mongodb.extraEnv | object | `{}` | set extra environment variables for the db | | mongodb.image | string | `"mongo"` | image to pull and use; for arm64 (eg Raspberry Pi 4), use "arm64v8/mongo" | | mongodb.imageTag | string | `"7.0"` | | | mongodb.password | string | `""` | | -| mongodb.persistence.accessModes | object | `{}` | | +| mongodb.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | | mongodb.persistence.annotations | object | `{}` | | -| mongodb.persistence.claimSuffix | string | `"config-claim"` | suffix string that will be appended to fullname | +| mongodb.persistence.claimSuffix | string | `"db-claim"` | suffix string that will be appended to fullname | | mongodb.persistence.create | bool | `true` | whether to create PVCs | | mongodb.persistence.enabled | bool | `true` | whether to deal with persistence at all | | mongodb.persistence.labels | object | `{}` | | @@ -45,7 +47,7 @@ Unifi Controller application using linuxservers Docker image. This chart was or | mongodb.podSecurityContext | object | `{}` | | | mongodb.username | string | `""` | credentials for "normal" and admin user; MUST BE SET! | | nameOverride | string | `""` | | -| persistence.accessModes | object | `{}` | | +| persistence.accessModes[0] | string | `"ReadWriteOnce"` | | | persistence.annotations | object | `{}` | | | persistence.claimSuffix | string | `"config-claim"` | suffix string that will be appended to fullname | | persistence.create | bool | `true` | whether to create PVCs | @@ -54,6 +56,7 @@ Unifi Controller application using linuxservers Docker image. This chart was or | persistence.size | string | `"128Mi"` | size limit for the PVC | | persistence.storageClass | string | `""` | override storage class | | persistence.volumeName | string | `""` | | +| podSecurityContext | object | `{}` | | | replicaCount | int | `1` | how many app replicas to run; only ever tested with 1 | | resources | object | `{}` | | | service.annotations | object | `{}` | | diff --git a/charts/unifi-network-application/templates/deployment.yaml b/charts/unifi-network-application/templates/deployment.yaml index 1fc6d9a..2c0450b 100644 --- a/charts/unifi-network-application/templates/deployment.yaml +++ b/charts/unifi-network-application/templates/deployment.yaml @@ -45,6 +45,7 @@ spec: value: {{ .Values.mongodb.password }} - name: MONGO_DBNAME value: {{ .Values.mongodb.dbname }} + {{- toYaml .Values.mongodb.extraEnv | nindent 12 }} ports: - name: 'mongo' @@ -105,6 +106,7 @@ spec: value: {{ .Values.mongodb.dbname }} - name: MONGO_AUTHSOURCE value: admin + {{- toYaml .Values.extraEnv | nindent 12 }} ports: - name: 'l2-discoverable' diff --git a/charts/unifi-network-application/values.yaml b/charts/unifi-network-application/values.yaml index a92bb31..df82023 100644 --- a/charts/unifi-network-application/values.yaml +++ b/charts/unifi-network-application/values.yaml @@ -63,8 +63,13 @@ persistence: podSecurityContext: {} # Settings for NFS running as nobody(65534): - # runAsUser: 65534 - # runAsGroup: 65534 + # fsGroup: 65534 + +# -- set extra environment variables for the app +extraEnv: {} + # Settings for NFS running as nobody(65534): + # PUID: 65534 + # PGID: 65534 mongodb: # -- image to pull and use; for arm64 (eg Raspberry Pi 4), use "arm64v8/mongo" @@ -100,5 +105,10 @@ mongodb: podSecurityContext: {} # Settings for NFS running as nobody(65534): - # runAsUser: 65534 - # runAsGroup: 65534 + # fsGroup: 65534 + + # -- set extra environment variables for the db + extraEnv: {} + # Settings for NFS running as nobody(65534): + # PUID: 65534 + # PGID: 65534