fix(beads-server): make BeadBoard .beads dir writable
BeadBoard needs to create templates/ and archetypes/ subdirectories inside .beads/. ConfigMap mounts are read-only, causing ENOENT errors and 503 responses. Fix: init container copies ConfigMap to emptyDir. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
00e2f15a5d
commit
f2037545b3
1 changed files with 20 additions and 2 deletions
|
|
@ -474,6 +474,21 @@ resource "kubernetes_deployment" "beadboard" {
|
|||
name = "registry-credentials"
|
||||
}
|
||||
|
||||
init_container {
|
||||
name = "seed-beads-config"
|
||||
image = "busybox:1.36"
|
||||
command = ["sh", "-c", "cp /config/* /beads/ && mkdir -p /beads/templates /beads/archetypes"]
|
||||
volume_mount {
|
||||
name = "beads-config"
|
||||
mount_path = "/config"
|
||||
read_only = true
|
||||
}
|
||||
volume_mount {
|
||||
name = "beads-writable"
|
||||
mount_path = "/beads"
|
||||
}
|
||||
}
|
||||
|
||||
container {
|
||||
name = "beadboard"
|
||||
image = "registry.viktorbarzin.me:5050/beadboard:latest"
|
||||
|
|
@ -484,9 +499,8 @@ resource "kubernetes_deployment" "beadboard" {
|
|||
}
|
||||
|
||||
volume_mount {
|
||||
name = "beads-config"
|
||||
name = "beads-writable"
|
||||
mount_path = "/app/.beads"
|
||||
read_only = true
|
||||
}
|
||||
|
||||
startup_probe {
|
||||
|
|
@ -531,6 +545,10 @@ resource "kubernetes_deployment" "beadboard" {
|
|||
name = kubernetes_config_map.beadboard_config.metadata[0].name
|
||||
}
|
||||
}
|
||||
volume {
|
||||
name = "beads-writable"
|
||||
empty_dir {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue