fix: git-sync permissions, probe, obsidian path alignment
This commit is contained in:
@@ -17,6 +17,9 @@ spec:
|
||||
imagePullSecrets:
|
||||
- name: gitea-registry
|
||||
|
||||
# fsGroup 65533 = git-sync uid, stellt sicher dass EmptyDir
|
||||
# fuer beide Container (mcp-server uid 1000 und git-sync uid 65533)
|
||||
# les- und schreibbar ist
|
||||
securityContext:
|
||||
fsGroup: 65533
|
||||
|
||||
@@ -27,12 +30,15 @@ spec:
|
||||
initContainers:
|
||||
- name: git-clone
|
||||
image: alpine/git:latest
|
||||
# Gleicher User wie git-sync damit Permissions konsistent bleiben
|
||||
securityContext:
|
||||
runAsUser: 65533
|
||||
command:
|
||||
- git
|
||||
- clone
|
||||
- --depth=1
|
||||
- $(OBSIDIAN_GIT_URL)
|
||||
- /obsidian
|
||||
- /obsidian/repo
|
||||
volumeMounts:
|
||||
- name: obsidian-repo
|
||||
mountPath: /obsidian
|
||||
@@ -56,8 +62,9 @@ spec:
|
||||
secretKeyRef:
|
||||
name: mcp-homelab-secret
|
||||
key: postgres-dsn-map
|
||||
# Muss auf /obsidian/repo zeigen — dort klont initContainer hin
|
||||
- name: OBSIDIAN_ROOT
|
||||
value: /obsidian
|
||||
value: /obsidian/repo
|
||||
volumeMounts:
|
||||
- name: obsidian-repo
|
||||
mountPath: /obsidian
|
||||
@@ -69,6 +76,8 @@ spec:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
# tcpSocket statt httpGet — Streamable HTTP antwortet auf GET /mcp
|
||||
# mit 405 (nur POST erlaubt), tcpSocket prueft nur ob Port offen ist
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 8000
|
||||
@@ -84,8 +93,11 @@ spec:
|
||||
image: registry.k8s.io/git-sync/git-sync:v4.3.0
|
||||
args:
|
||||
- --repo=$(OBSIDIAN_GIT_URL)
|
||||
# root=/obsidian, link=repo → Symlink /obsidian/repo → /obsidian/<hash>
|
||||
# initContainer klont direkt nach /obsidian/repo, danach uebernimmt
|
||||
# git-sync und ersetzt es durch seinen Symlink-Mechanismus
|
||||
- --root=/obsidian
|
||||
- --link=current
|
||||
- --link=repo
|
||||
- --period=5m
|
||||
- --depth=1
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user