Skip to content

Have the initContainer use user provided UID and GID#7

Open
perfectra1n wants to merge 6 commits intomainfrom
add-uid-gid-ability
Open

Have the initContainer use user provided UID and GID#7
perfectra1n wants to merge 6 commits intomainfrom
add-uid-gid-ability

Conversation

@perfectra1n
Copy link
Member

Have the initContainer use the user provided UID and GID, which it then runs chown for, against the Trilium data on their behalf.

@github-actions
Copy link

github-actions bot commented Oct 8, 2024

Changes in Final Manifest

  • manifest.yaml
Details

manifest.yaml

--- a/main/charts/trilium/build/manifest.yaml
+++ b/charts/trilium/build/manifest.yaml
@@ -9,7 +9,7 @@ metadata:
     app.kubernetes.io/managed-by: Helm
     app.kubernetes.io/name: trilium
     app.kubernetes.io/version: 0.90.4
-    helm.sh/chart: trilium-1.2.0
+    helm.sh/chart: trilium-1.2.1
 data:
   config.ini: |
     [General]
@@ -53,7 +53,7 @@ metadata:
     app.kubernetes.io/name: trilium
     app.kubernetes.io/service: trilium
     app.kubernetes.io/version: 0.90.4
-    helm.sh/chart: trilium-1.2.0
+    helm.sh/chart: trilium-1.2.1
 spec:
   type: ClusterIP
   ports:
@@ -77,7 +77,7 @@ metadata:
     app.kubernetes.io/managed-by: Helm
     app.kubernetes.io/name: trilium
     app.kubernetes.io/version: 0.90.4
-    helm.sh/chart: trilium-1.2.0
+    helm.sh/chart: trilium-1.2.1
 spec:
   revisionHistoryLimit: 3
   replicas: 1
@@ -117,8 +117,10 @@ spec:
             name: data
       containers: 
         - env:
-          - name: key
-            value: value
+          - name: USER_GID
+            value: "1000"
+          - name: USER_UID
+            value: "1000"
           image: triliumnext/notes:v0.90.4
           imagePullPolicy: IfNotPresent
           livenessProbe:
@@ -138,6 +140,9 @@ spec:
             initialDelaySeconds: 5
             periodSeconds: 20
             timeoutSeconds: 10
+          securityContext:
+            fsGroup: 1000
+            fsGroupChangePolicy: OnRootMismatch
           startupProbe:
             failureThreshold: 10
             httpGet:

See the workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant