Skip to content
Merged
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
7 changes: 7 additions & 0 deletions charts/imp/templates/agent/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ spec:
mountPath: /run/imp
- name: image-cache
mountPath: /var/lib/imp/images
# The agent creates and removes suspend directories; Firecracker writes snapshots.
- name: suspend-dir
mountPath: /var/lib/imp/suspend
volumes:
- name: dev-kvm
hostPath:
Expand Down Expand Up @@ -101,4 +104,8 @@ spec:
{{- else }}
emptyDir: {}
{{- end }}
- name: suspend-dir
hostPath:
path: /var/lib/imp/suspend
type: DirectoryOrCreate
terminationGracePeriodSeconds: 10
38 changes: 38 additions & 0 deletions charts/imp/tests/suspend-storage_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
suite: shared suspend snapshot storage
templates:
- templates/agent/daemonset.yaml
- templates/runtime/daemonset.yaml
set:
agent.env.kernelPath: /var/lib/imp/vmlinux
tests:
- it: mounts node-local suspend storage into the agent
template: templates/agent/daemonset.yaml
asserts:
- contains:
path: spec.template.spec.containers[0].volumeMounts
content:
name: suspend-dir
mountPath: /var/lib/imp/suspend
- contains:
path: spec.template.spec.volumes
content:
name: suspend-dir
hostPath:
path: /var/lib/imp/suspend
type: DirectoryOrCreate

- it: mounts the same node-local suspend storage into the runtime
template: templates/runtime/daemonset.yaml
asserts:
- contains:
path: spec.template.spec.containers[0].volumeMounts
content:
name: suspend-dir
mountPath: /var/lib/imp/suspend
- contains:
path: spec.template.spec.volumes
content:
name: suspend-dir
hostPath:
path: /var/lib/imp/suspend
type: DirectoryOrCreate
Loading