fix: align opencode workspace event root
This commit is contained in:
@@ -5842,6 +5842,27 @@ function opencodeServerManifest({ profile = "v03", source, deploy = null, catalo
|
||||
spec: {
|
||||
serviceAccountName: name,
|
||||
securityContext: { fsGroup: 1000, fsGroupChangePolicy: "OnRootMismatch" },
|
||||
initContainers: [{
|
||||
name: "opencode-workspace-git-init",
|
||||
image: helperImage,
|
||||
imagePullPolicy: "IfNotPresent",
|
||||
command: ["/bin/sh", "-ec"],
|
||||
args: [
|
||||
[
|
||||
"set -eu",
|
||||
"mkdir -p /workspace",
|
||||
"if [ ! -d /workspace/.git ]; then",
|
||||
" git -C /workspace init",
|
||||
"fi",
|
||||
"git -C /workspace config user.name 'HWLAB OpenCode' || true",
|
||||
"git -C /workspace config user.email 'opencode@hwlab.local' || true",
|
||||
"chgrp -R 1000 /workspace/.git 2>/dev/null || true",
|
||||
"chmod -R g+rwX /workspace/.git 2>/dev/null || true"
|
||||
].join("\n")
|
||||
],
|
||||
resources: { requests: { cpu: "25m", memory: "64Mi" }, limits: { cpu: "250m", memory: "256Mi" } },
|
||||
volumeMounts: [{ name: "workspace", mountPath: "/workspace" }]
|
||||
}],
|
||||
containers: [{
|
||||
name,
|
||||
image: "ghcr.io/anomalyco/opencode:1.17.7",
|
||||
|
||||
Reference in New Issue
Block a user