nginx-proxy-manager: allow changing puid/pgid (#2340)

* nginx-proxy-manager: allow changing puid/pgid

* restore quites

* restore quotes

* fix defaults

* make better
This commit is contained in:
Stavros Kois
2024-04-05 14:18:05 +03:00
committed by GitHub
parent 9eb1b20597
commit e594704788
5 changed files with 40 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ description: Expose your services easily and securely
annotations:
title: Nginx Proxy Manager
type: application
version: 1.0.28
version: 1.0.29
apiVersion: v2
appVersion: 2.11.1
kubeVersion: '>=1.16.0-0'

View File

@@ -16,6 +16,15 @@ def migrate(values):
values[storageKey][storage] = {key: value for key, value in check_val.items() if key != 'hostPath'}
# If there is no npmID, add it defaults to
# 1000 to account for existing installations
if values.get('npmID', None) is None:
values.update({
'npmID': {
'user': 1000,
'group': 1000
}
})
return values

View File

@@ -59,6 +59,28 @@ questions:
schema:
type: string
required: true
- variable: npmID
label: ""
group: User and Group Configuration
schema:
type: dict
attrs:
- variable: user
label: User ID
description: The user id that Nginx Proxy Manager files will be owned by.
schema:
type: int
min: 2
default: 568
required: true
- variable: group
label: Group ID
description: The group id that Nginx Proxy Manager files will be owned by.
schema:
type: int
min: 2
default: 568
required: true
- variable: npmNetwork
label: ""

View File

@@ -1,4 +1,7 @@
{{- define "npm.workload" -}}
{{- if not .Values.npmID -}}
{{- $_ := set .Values "npmID" dict -}}
{{- end }}
workload:
npm:
enabled: true
@@ -7,7 +10,7 @@ workload:
podSpec:
hostNetwork: false
securityContext:
fsGroup: 1000
fsGroup: {{ .Values.npmID.group | default 1000 }}
containers:
npm:
enabled: true
@@ -30,9 +33,7 @@ workload:
# Needed for: Nginx Service
- FOWNER
fixedEnv:
# FIXME: Revisit once upstream irons out some issues in regarids with PUID.
# Make sure 568 PUID works before exposing
PUID: 1000
PUID: {{ .Values.npmID.user | default 1000 }}
env:
DISABLE_IPV6: true
DB_SQLITE_FILE: /data/database.sqlite

View File

@@ -12,6 +12,9 @@ npmNetwork:
webPort: 30020
httpPort: 30021
httpsPort: 30022
npmID:
user: 568
group: 568
npmStorage:
data:
type: ixVolume