Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions helm/siclaw/templates/gateway-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,8 @@ spec:
resources:
{{- toYaml .Values.gateway.resources | nindent 12 }}
volumeMounts:
- name: skills
mountPath: /app/.siclaw/skills
{{- if .Values.agentbox.persistence.enabled }}
- name: user-data
- name: agentbox-user-data
mountPath: {{ .Values.agentbox.persistence.mountPath }}
{{- end }}
livenessProbe:
Expand All @@ -95,10 +93,8 @@ spec:
initialDelaySeconds: 5
periodSeconds: 10
volumes:
- name: skills
emptyDir: {}
{{- if .Values.agentbox.persistence.enabled }}
- name: user-data
- name: agentbox-user-data
persistentVolumeClaim:
claimName: {{ .Values.agentbox.persistence.claimName }}
{{- end }}
2 changes: 1 addition & 1 deletion helm/siclaw/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ agentbox:
persistence:
enabled: false # set to true to persist user memory across pod restarts
claimName: "siclaw-data" # name of pre-existing shared PVC (must support ReadWriteMany)
mountPath: "/app/.siclaw/user-data" # gateway mount path (env + volumeMount must match)
mountPath: "/app/.siclaw/agentbox-user-data" # gateway mount path for ensureUserDir (env + volumeMount must match)

# -- Database (MySQL — SQLite is not supported in K8s mode)
database:
Expand Down
8 changes: 2 additions & 6 deletions k8s/gateway-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ spec:
- name: SICLAW_PERSISTENCE_CLAIM_NAME
value: "siclaw-data"
- name: SICLAW_PERSISTENCE_MOUNT_PATH
value: "/app/.siclaw/user-data"
value: "/app/.siclaw/agentbox-user-data"
- name: SICLAW_DATABASE_URL
valueFrom:
secretKeyRef:
Expand All @@ -86,13 +86,9 @@ spec:
initialDelaySeconds: 2
periodSeconds: 2
volumeMounts:
- name: skills-local
mountPath: /app/.siclaw/skills
- name: user-data
mountPath: /app/.siclaw/user-data
mountPath: /app/.siclaw/agentbox-user-data
volumes:
- name: skills-local
emptyDir: {}
- name: user-data
persistentVolumeClaim:
claimName: siclaw-data
Expand Down
2 changes: 1 addition & 1 deletion src/gateway-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const spawner = useK8s
? {
enabled: true,
claimName: process.env.SICLAW_PERSISTENCE_CLAIM_NAME || "siclaw-data",
mountPath: process.env.SICLAW_PERSISTENCE_MOUNT_PATH || "/app/.siclaw/user-data",
mountPath: process.env.SICLAW_PERSISTENCE_MOUNT_PATH || "/app/.siclaw/agentbox-user-data",
}
: undefined,
})
Expand Down
6 changes: 3 additions & 3 deletions src/gateway/agentbox/k8s-spawner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface K8sSpawnerConfig {
enabled: boolean;
/** Name of the pre-existing shared PVC (e.g. "siclaw-data") */
claimName: string;
/** Local mount path of the shared PVC on the gateway (default: "/app/.siclaw/user-data") */
/** Local mount path of the shared PVC on the gateway (default: "/app/.siclaw/agentbox-user-data") */
mountPath?: string;
};
}
Expand Down Expand Up @@ -278,7 +278,7 @@ export class K8sSpawner implements BoxSpawner {
},
{
name: "user-data",
mountPath: "/app/.siclaw/user-data",
mountPath: "/app/.siclaw/agentbox-user-data",
...(this.config.persistence?.enabled
? { subPath: `users/${safeUserId}/${safeWorkspaceId}` }
: {}),
Expand Down Expand Up @@ -350,7 +350,7 @@ export class K8sSpawner implements BoxSpawner {
* Directory layout: `{mountPath}/users/{safeUserId}/{safeWorkspaceId}/`
*/
private ensureUserDir(safeUserId: string, safeWorkspaceId: string): void {
const mountPath = this.config.persistence?.mountPath || "/app/.siclaw/user-data";
const mountPath = this.config.persistence?.mountPath || "/app/.siclaw/agentbox-user-data";
const base = path.resolve(mountPath);
const userDir = path.join(base, "users", safeUserId, safeWorkspaceId);
if (!userDir.startsWith(base)) {
Expand Down
Loading