From 421d9e98528b4303f096f4c1b76b9678d962ef0b Mon Sep 17 00:00:00 2001 From: sallyom Date: Fri, 10 Oct 2025 12:13:34 -0400 Subject: [PATCH] update volume mount paths to fix early cleanup of artifacts Signed-off-by: sallyom --- components/operator/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/operator/main.go b/components/operator/main.go index 7b935b6e9..80e76fd43 100644 --- a/components/operator/main.go +++ b/components/operator/main.go @@ -359,7 +359,7 @@ func handleAgenticSessionEvent(obj *unstructured.Unstructured) error { ImagePullPolicy: imagePullPolicy, Env: []corev1.EnvVar{ {Name: "CONTENT_SERVICE_MODE", Value: "true"}, - {Name: "STATE_BASE_DIR", Value: "/data/state"}, + {Name: "STATE_BASE_DIR", Value: "/workspace"}, }, Ports: []corev1.ContainerPort{{ContainerPort: 8080, Name: "http"}}, ReadinessProbe: &corev1.Probe{ @@ -372,7 +372,7 @@ func handleAgenticSessionEvent(obj *unstructured.Unstructured) error { InitialDelaySeconds: 5, PeriodSeconds: 5, }, - VolumeMounts: []corev1.VolumeMount{{Name: "workspace", MountPath: "/data/state"}}, + VolumeMounts: []corev1.VolumeMount{{Name: "workspace", MountPath: "/workspace"}}, }, { Name: "ambient-code-runner", @@ -437,7 +437,7 @@ func handleAgenticSessionEvent(obj *unstructured.Unstructured) error { }}, }) // Add CR-provided envs last (override base when same key) - if spec, ok := obj.Object["spec"].(map[string]interface{}); ok { + if spec, ok := currentObj.Object["spec"].(map[string]interface{}); ok { // Inject REPOS_JSON and MAIN_REPO_NAME from spec.repos and spec.mainRepoName if present if repos, ok := spec["repos"].([]interface{}); ok && len(repos) > 0 { // Use a minimal JSON serialization via fmt (we'll rely on client to pass REPOS_JSON too)