rootless api

This commit is contained in:
Stavros kois
2023-11-10 18:16:56 +02:00
committed by Stavros Kois
parent 0ce6eb3699
commit 6e8d31ecee
6 changed files with 66 additions and 21 deletions

View File

@@ -5,7 +5,7 @@ annotations:
type: application
version: 1.0.0
apiVersion: v2
appVersion: latest
appVersion: 0.21.0
kubeVersion: '>=1.16.0-0'
maintainers:
- name: truenas

View File

@@ -0,0 +1,23 @@
vikunjaNetwork:
webPort: 31000
vikunjaConfig:
url: http://localhost:31000
maxFileSize: 20
vikunjaRunAs:
user: 1000
group: 1000
vikunjaStorage:
data:
type: pvc
pgData:
type: pvc
pgBackup:
type: emptyDir
additionalStorages:
- type: pvc
mountPath: /data1
- type: pvc
mountPath: /data2

View File

@@ -1,9 +1,9 @@
runAsContext:
- userName: root
groupName: root
gid: 0
uid: 0
description: Vikunja API runs as root user.
- userName: vikunja
groupName: vikunja
gid: 568
uid: 568
description: Vikunja API can run as any non-root user
- userName: nginx
groupName: nginx
gid: 101
@@ -19,11 +19,5 @@ runAsContext:
gid: 999
uid: 999
description: Postgres runs as a non-root user.
capabilities:
- name: CHOWN
description: Vikunka API is able to chown files.
- name: SETGID
description: Vikunka API is able to set group ID for it's sub-processes.
- name: SETUID
description: Vikunka API is able to set user ID for it's sub-processes.
capabilities: []
hostMounts: []

View File

@@ -1,6 +1,8 @@
groups:
- name: Vikunja Configuration
description: Configure Vikunja
- name: User and Group Configuration
description: Configure User and Group for Vikunja
- name: Network Configuration
description: Configure Network for Vikunja
- name: Storage Configuration
@@ -77,6 +79,29 @@ questions:
type: string
required: true
- variable: vikunjaRunAs
label: ""
group: User and Group Configuration
schema:
type: dict
attrs:
- variable: user
label: User ID
description: The user id that Vikunja will run as.
schema:
type: int
min: 2
default: 568
required: true
- variable: group
label: Group ID
description: The group id that Vikunja will run as.
schema:
type: int
min: 2
default: 568
required: true
- variable: vikunjaNetwork
label: ""
group: Network Configuration

View File

@@ -12,15 +12,14 @@ workload:
primary: true
imageSelector: image
securityContext:
runAsUser: 0
runAsGroup: 0
runAsUser: {{ .Values.vikunjaRunAs.user }}
runAsGroup: {{ .Values.vikunjaRunAs.group }}
runAsNonRoot: false
readOnlyRootFilesystem: false
capabilities:
add:
- CHOWN
- SETGID
- SETUID
env:
# Make vikunja skip user creation
PUID: ""
PGID: ""
envFrom:
- secretRef:
name: vikunja-creds

View File

@@ -21,6 +21,10 @@ vikunjaConfig:
maxFileSize: 20
additionalEnvs: []
vikunjaRunAs:
user: 568
group: 568
vikunjaNetwork:
webPort: 31002