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