@@ -18,13 +18,22 @@ type ImpVMSnapshotSpec struct {
1818 // +optional
1919 Schedule string `json:"schedule,omitempty"`
2020
21- // Retention is the number of completed snapshots to keep (oldest pruned first).
21+ // Retention is the number of completed executions to keep (oldest pruned first).
2222 // +optional
2323 // +kubebuilder:default=3
24+ // +kubebuilder:validation:Minimum=1
25+ // +kubebuilder:validation:Maximum=10
2426 Retention int32 `json:"retention,omitempty"`
2527
2628 // Storage defines where the snapshot artifact is persisted.
2729 Storage SnapshotStorageSpec `json:"storage"`
30+
31+ // BaseSnapshot pins a specific child execution as the elected base image.
32+ // Set declaratively or via `kubectl imp elect`.
33+ // Consumers (ImpWarmPool, ImpVMMigration) use this as their boot source.
34+ // The operator validates the named child exists and has phase=Succeeded.
35+ // +optional
36+ BaseSnapshot string `json:"baseSnapshot,omitempty"`
2837}
2938
3039// SnapshotStorageSpec configures snapshot artifact storage.
@@ -33,12 +42,25 @@ type SnapshotStorageSpec struct {
3342 // +kubebuilder:validation:Enum=node-local;oci-registry
3443 Type string `json:"type"`
3544
45+ // NodeLocal configures node-local artifact storage.
46+ // Required when Type is "node-local".
47+ // +optional
48+ NodeLocal * NodeLocalSpec `json:"nodeLocal,omitempty"`
49+
3650 // OCIRegistry configures an OCI registry destination.
3751 // Required when Type is "oci-registry".
3852 // +optional
3953 OCIRegistry * OCIRegistrySpec `json:"ociRegistry,omitempty"`
4054}
4155
56+ // NodeLocalSpec configures node-local snapshot storage.
57+ type NodeLocalSpec struct {
58+ // Path is the base directory for snapshot artifacts on the node.
59+ // Supports remotely-mounted paths (NFS, etc.).
60+ // +kubebuilder:default="/var/lib/imp/snapshots"
61+ Path string `json:"path,omitempty"`
62+ }
63+
4264// OCIRegistrySpec configures OCI registry access for snapshot storage.
4365type OCIRegistrySpec struct {
4466 // Repository is the full image reference prefix
@@ -72,6 +94,21 @@ type ImpVMSnapshotStatus struct {
7294 // +optional
7395 NextScheduledAt * metav1.Time `json:"nextScheduledAt,omitempty"`
7496
97+ // LastExecutionRef is the most recently created child execution object.
98+ // +optional
99+ LastExecutionRef * corev1.LocalObjectReference `json:"lastExecutionRef,omitempty"`
100+
101+ // BaseSnapshot mirrors spec.baseSnapshot once the referenced child is
102+ // validated as Succeeded. Consumers read this field only.
103+ // +optional
104+ BaseSnapshot string `json:"baseSnapshot,omitempty"`
105+
106+ // TerminatedAt is set by the agent once the execution reaches a terminal
107+ // state (Succeeded or Failed) and all cleanup is complete.
108+ // The operator uses this — not phase alone — to gate new execution creation.
109+ // +optional
110+ TerminatedAt * metav1.Time `json:"terminatedAt,omitempty"`
111+
75112 // Conditions follow the standard k8s condition convention.
76113 // +optional
77114 // +listType=map
0 commit comments