summaryrefslogtreecommitdiff
path: root/f3s/git-server/helm-chart/templates/configmap-cgit.yaml
blob: 7dda69399c6dda0e9ff1f4f17bbe87679e5a6db7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# CGit Configuration
# Configures cgit to scan /repos for git repositories

apiVersion: v1
kind: ConfigMap
metadata:
  name: cgit-config
  namespace: cicd
data:
  cgitrc: |
    # Global settings
    root-title=f3s Git Repository Browser
    root-desc=Browse git repositories in f3s cluster

    # Set the virtual root for correct URL generation
    virtual-root=/

    # Response cache. With scan-path over ~80 repos on NFS, an uncached render
    # reopens every repo to resolve its age column: measured 376ms per index
    # page, 87% of it NFS wait rather than CPU. Caching drops that to ~19-29ms.
    # cache-root must be node-local and writable by UID 33 -- it points at the
    # cgit-runtime emptyDir mounted on /tmp, NOT at the NFS-backed /repos
    # (caching on NFS is what originally caused the permission trouble here).
    # The startup script in deployment.yaml creates the directory.
    cache-root=/tmp/cgit-cache
    cache-size=1000

    # TTLs in minutes; these are cgit's defaults, stated explicitly so the
    # staleness window after a push is visible rather than implied.
    # Static pages are keyed by commit SHA, so they never need to expire.
    cache-root-ttl=5
    cache-repo-ttl=5
    cache-dynamic-ttl=5
    cache-static-ttl=-1

    # Enable git-config for per-repo settings
    enable-git-config=1

    # Remove .git suffix from repository URLs
    remove-suffix=1

    # Scan for repositories in /repos
    # This must be the last setting in the file
    scan-path=/repos