From 1ad002ea626fb70db757c45634bbc013675e2419 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 9 Jan 2026 11:29:01 +0200 Subject: Disable cgit caching to avoid permission issues Instead of fighting permission issues with the cgit cache directory, disable caching entirely by: - Setting cache-size=0 in cgitrc - Removing cgit-cache emptyDir volume and mounts - Simplifying initContainer (only SSH keys setup needed) cgit will work without caching, just slightly slower for large repos. --- f3s/git-server/helm-chart/templates/configmap-cgit.yaml | 3 +++ f3s/git-server/helm-chart/templates/deployment.yaml | 8 -------- 2 files changed, 3 insertions(+), 8 deletions(-) (limited to 'f3s/git-server') diff --git a/f3s/git-server/helm-chart/templates/configmap-cgit.yaml b/f3s/git-server/helm-chart/templates/configmap-cgit.yaml index 840fbd4..08561f3 100644 --- a/f3s/git-server/helm-chart/templates/configmap-cgit.yaml +++ b/f3s/git-server/helm-chart/templates/configmap-cgit.yaml @@ -12,6 +12,9 @@ data: root-title=f3s Git Repository Browser root-desc=Browse git repositories in f3s cluster + # Disable caching to avoid permission issues + cache-size=0 + # Enable git-config for per-repo settings enable-git-config=1 diff --git a/f3s/git-server/helm-chart/templates/deployment.yaml b/f3s/git-server/helm-chart/templates/deployment.yaml index bfd9387..0fa3620 100644 --- a/f3s/git-server/helm-chart/templates/deployment.yaml +++ b/f3s/git-server/helm-chart/templates/deployment.yaml @@ -25,13 +25,9 @@ spec: - /bin/sh - -c - | - mkdir -p /cache-init - chown -R 101:1000 /cache-init mkdir -p /ssh-init chown -R 0:0 /ssh-init volumeMounts: - - name: cgit-cache - mountPath: /cache-init - name: ssh-host-keys mountPath: /ssh-init @@ -89,8 +85,6 @@ spec: mountPath: /etc/cgitrc subPath: cgitrc readOnly: true - - name: cgit-cache - mountPath: /var/cache/cgit securityContext: runAsUser: 0 runAsGroup: 0 @@ -116,7 +110,5 @@ spec: - name: cgit-config configMap: name: cgit-config - - name: cgit-cache - emptyDir: {} - name: ssh-host-keys emptyDir: {} -- cgit v1.2.3