Skip to content

Commit a6d1403

Browse files
authored
Switch ateom gVisor state path (#8)
1 parent 727d8aa commit a6d1403

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

internal/ateompath/ateompath.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
const (
2323
// The base path. This is both the path of the root shared folder on the
2424
// host filesystem, and when it is mounted into ateom and atelet containers.
25-
BasePath = "/run/ateom-gvisor"
25+
BasePath = "/var/lib/ateom-gvisor"
2626
)
2727

2828
var (

internal/controllers/workerpool_controller.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import (
3131
"sigs.k8s.io/controller-runtime/pkg/client"
3232
"sigs.k8s.io/controller-runtime/pkg/log"
3333

34+
"github.com/agent-substrate/substrate/internal/ateompath"
3435
atev1alpha1 "github.com/agent-substrate/substrate/pkg/api/v1alpha1"
3536
)
3637

@@ -155,14 +156,14 @@ func buildDeploymentApplyConfig(wp *atev1alpha1.WorkerPool) *appsv1ac.Deployment
155156
).
156157
WithVolumeMounts(corev1ac.VolumeMount().
157158
WithName("run-ateom").
158-
WithMountPath("/run/ateom-gvisor"))).
159+
WithMountPath(ateompath.BasePath))).
159160
WithSecurityContext(corev1ac.PodSecurityContext().
160161
WithRunAsUser(0).
161162
WithRunAsGroup(0)).
162163
WithVolumes(corev1ac.Volume().
163164
WithName("run-ateom").
164165
WithHostPath(corev1ac.HostPathVolumeSource().
165-
WithPath("/run/ateom-gvisor").
166+
WithPath(ateompath.BasePath).
166167
WithType(corev1.HostPathDirectoryOrCreate))))))
167168
}
168169

manifests/ate-install/atelet.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ spec:
9090
protocol: TCP
9191
volumeMounts:
9292
- name: run-ateom
93-
mountPath: /run/ateom-gvisor
93+
mountPath: /var/lib/ateom-gvisor
9494
volumes:
9595
- name: run-ateom
9696
hostPath:
97-
path: /run/ateom-gvisor
98-
type: DirectoryOrCreate
97+
path: /var/lib/ateom-gvisor
98+
type: DirectoryOrCreate

0 commit comments

Comments
 (0)