Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have the initContainer use user provided UID and GID #7

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

perfectra1n
Copy link
Contributor

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

Copy link

github-actions bot commented Oct 8, 2024

Changes in Final Manifest

  • manifest.yaml

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