v1alpha1

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

+kubebuilder:object:generate=true +groupName=nvidia.com

Index

Constants

View Source
const (
	// CaptureEligibleLabel is the gate-applied promotion label: the node agent's pre-bind gate
	// adds it only after the source pod passes validation. The agent's source-pod capture
	// informer keys on it so only gate-validated pods drive the capture path.
	CaptureEligibleLabel = "nvidia.com/snapshot-capture-eligible"

	// SnapshotNodeLabel mirrors PodSnapshotContent.spec.source.nodeName onto the
	// object so the per-node agent's cache can label-select work for its node.
	SnapshotNodeLabel = "nvidia.com/snapshot-node"

	CheckpointVolumeName = "checkpoint-storage"
)

Snapshot control-plane labels and storage vocabulary shared by the operator and node agent. Workload Pod contract constants live in api/podcontract.

View Source
const (
	// PodSnapshotConditionReady is True when the checkpoint and binding completed and
	// the snapshot is usable for restore.
	PodSnapshotConditionReady = "Ready"
	// PodSnapshotConditionFailed is True when the checkpoint or binding failed terminally.
	PodSnapshotConditionFailed = "Failed"
)

PodSnapshot and PodSnapshotContent status condition types. Both objects share this vocabulary; the operator and node agent set them via meta.SetStatusCondition.

View Source
const (
	KindPodSnapshot            = "PodSnapshot"
	KindPodSnapshotContent     = "PodSnapshotContent"
	KindPodSnapshotContentList = "PodSnapshotContentList"
)

Kind names, for callers that set TypeMeta explicitly when building objects.

View Source
const (
	// SnapshotJobConditionRunning is True when the source pod is running and ready
	// (readiness probe passed).
	SnapshotJobConditionRunning = "Running"
	// SnapshotJobConditionCaptured is True when the CRIU dump of the target
	// container is complete (PodSnapshot Ready=True).
	SnapshotJobConditionCaptured = "Captured"
	// SnapshotJobConditionCompleted is True when the snapshot is durable
	// (PodSnapshot Ready=True) AND the source Job has
	// finished. The checkpoint terminates the target container (its exit is
	// expected and never required to be zero), but every other container must
	// run to completion and exit 0 before cleanup: deleting the Job earlier
	// would kill helper containers (e.g. a GMS saver writing weight artifacts
	// concurrently with the dump) mid-work.
	SnapshotJobConditionCompleted = "Completed"
	// SnapshotJobConditionFailed is True on terminal failure. The batch/v1 Job is
	// preserved for status and debugging; Kubernetes controls failed pod retention.
	SnapshotJobConditionFailed = "Failed"
)

SnapshotJob condition types. The controller sets these via meta.SetStatusCondition.

View Source
const (
	// Running
	ReasonPodPending = "PodPending"
	ReasonPodReady   = "PodReady"

	// Captured
	ReasonCaptureInProgress = "CaptureInProgress"
	ReasonCaptureCompleted  = "CaptureCompleted"

	// Completed. WaitingForPodCompletion covers the window where the snapshot
	// is Ready but the source pod's other containers (helpers such as
	// a GMS saver) are still running. JobCompleted means the source Job
	// finished with every non-target container exiting 0; the target
	// container's own exit is expected to be the checkpoint's kill.
	ReasonWaitingForPodCompletion = "WaitingForPodCompletion"
	ReasonJobCompleted            = "JobCompleted"

	// Failed=False. ReasonNoFailure means no failure has been observed
	// (metav1.Condition requires a non-empty reason, so the condition cannot
	// be present without one). All four conditions are present from the first
	// status write and are only updated afterwards (status/reason/message),
	// never removed, so consumers can always distinguish "known False" from
	// "not yet evaluated".
	ReasonNoFailure = "NoFailure"

	// Failed=True
	ReasonCaptureFailed     = "CaptureFailed"
	ReasonPodSnapshotFailed = "PodSnapshotFailed"
	ReasonJobFailed         = "JobFailed"
	ReasonDeadlineExceeded  = "DeadlineExceeded"
	// ReasonSourceCompletedWithoutCapture means the BatchJob reported Complete=True,
	// but the authoritative PodSnapshotContent remained nonterminal after the source
	// pod exited. There is no observed capture error; the required capture result is
	// missing after the source exited.
	ReasonSourceCompletedWithoutCapture = "SourceCompletedWithoutCapture"
	ReasonPodSnapshotNameConflict       = "PodSnapshotNameConflict"
	// ReasonPodSnapshotDeleted means a previously recorded PodSnapshot no
	// longer exists. SnapshotJob is one-shot, so the capture is not recreated.
	ReasonPodSnapshotDeleted = "PodSnapshotDeleted"
	// ReasonJobNameConflict means the deterministic Job name is held by a
	// foreign object or by a different Job UID than the one already recorded.
	ReasonJobNameConflict = "JobNameConflict"
	ReasonJobDeleted      = "JobDeleted"
	// ReasonInvalidSpec covers spec-level validation failures caught before
	// building the source Job, for objects that bypassed CEL admission.
	ReasonInvalidSpec = "InvalidSpec"
)

SnapshotJob condition reasons.

View Source
const SnapshotJobOwnerLabel = "nvidia.com/snapshot-job"

SnapshotJobOwnerLabel maps a produced PodSnapshot back to the SnapshotJob that created it. The PodSnapshot deliberately carries no ownerReference (artifacts must outlive the SnapshotJob), so this label is the lookup key controllers use instead of an owner-based watch.

View Source
const SnapshotJobOwnerUIDLabel = "nvidia.com/snapshot-job-uid"

SnapshotJobOwnerUIDLabel binds SnapshotJob-created resources to one concrete SnapshotJob incarnation. It is stamped into the source Job's immutable pod template and onto the produced PodSnapshot; the name label alone is insufficient because names can be reused.

Variables

View Source
var GroupVersion = SchemeGroupVersion

GroupVersion is an alias for SchemeGroupVersion, used by callers that build typed objects (e.g. the operator setting APIVersion on a PodSnapshotContent).

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: "nvidia.com", Version: "v1alpha1"}

Functions

func AddToScheme

func AddToScheme(s *runtime.Scheme) error

func IsPodSnapshotContentFailed

func IsPodSnapshotContentFailed(c *PodSnapshotContent) bool

IsPodSnapshotContentFailed reports whether the PodSnapshotContent's Failed condition is True.

func IsPodSnapshotContentSucceeded

func IsPodSnapshotContentSucceeded(c *PodSnapshotContent) bool

IsPodSnapshotContentSucceeded reports whether the PodSnapshotContent's Ready condition is True.

func IsPodSnapshotFailed

func IsPodSnapshotFailed(s *PodSnapshot) bool

IsPodSnapshotFailed reports whether the PodSnapshot's Failed condition is True.

func IsPodSnapshotSucceeded

func IsPodSnapshotSucceeded(s *PodSnapshot) bool

IsPodSnapshotSucceeded reports whether the PodSnapshot's Ready condition is True.

func IsSnapshotJobCompleted

func IsSnapshotJobCompleted(j *SnapshotJob) bool

IsSnapshotJobCompleted reports whether the SnapshotJob's Completed condition is True.

func IsSnapshotJobFailed

func IsSnapshotJobFailed(j *SnapshotJob) bool

IsSnapshotJobFailed reports whether the SnapshotJob's Failed condition is True.

func IsSnapshotJobTerminal

func IsSnapshotJobTerminal(j *SnapshotJob) bool

IsSnapshotJobTerminal reports whether the SnapshotJob has reached a terminal state (Completed=True or Failed=True). Completed objects may still reconcile to retry source Job cleanup.

Types

type CheckpointReadinessProbe added in v0.3.0

type CheckpointReadinessProbe struct {
	CheckpointReadinessProbeHandler `json:",inline"`

	// InitialDelaySeconds is how long to wait after the container starts
	// before the first check.
	// +optional
	// +kubebuilder:default=0
	// +kubebuilder:validation:Minimum=0
	InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty"`

	// PeriodSeconds is the time between checks.
	// +optional
	// +kubebuilder:default=1
	// +kubebuilder:validation:Minimum=1
	PeriodSeconds int32 `json:"periodSeconds,omitempty"`

	// TimeoutSeconds limits each check.
	// +optional
	// +kubebuilder:default=1
	// +kubebuilder:validation:Minimum=1
	TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"`

	// SuccessThreshold is how many checks in a row must succeed.
	// +optional
	// +kubebuilder:default=1
	// +kubebuilder:validation:Minimum=1
	SuccessThreshold int32 `json:"successThreshold,omitempty"`
}

CheckpointReadinessProbe checks whether the application is safe to checkpoint. Snapshot checks it every periodSeconds until it succeeds successThreshold times in a row. A failed check resets the count and Snapshot keeps waiting; the container is never restarted. +kubebuilder:validation:XValidation:rule="has(self.file) != has(self.httpGet)",message="set exactly one of file or httpGet"

func (*CheckpointReadinessProbe) DeepCopy added in v0.3.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CheckpointReadinessProbe.

func (*CheckpointReadinessProbe) DeepCopyInto added in v0.3.0

func (in *CheckpointReadinessProbe) DeepCopyInto(out *CheckpointReadinessProbe)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CheckpointReadinessProbeHandler added in v0.3.0

type CheckpointReadinessProbeHandler struct {
	// File succeeds when a regular file exists at the path, inside the
	// container. Like an exec probe, Snapshot checks it by running a shell
	// in the container, as the container's user, so the image needs a shell.
	// +optional
	File *ControlFileAction `json:"file,omitempty"`

	// HTTPGet succeeds when a GET to the Pod IP returns a 2xx status.
	// Snapshot does not follow redirects, so a 3xx fails.
	// +optional
	HTTPGet *HTTPGetAction `json:"httpGet,omitempty"`
}

CheckpointReadinessProbeHandler is how the probe checks the application.

func (*CheckpointReadinessProbeHandler) DeepCopy added in v0.3.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CheckpointReadinessProbeHandler.

func (*CheckpointReadinessProbeHandler) DeepCopyInto added in v0.3.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CheckpointSource added in v0.2.0

type CheckpointSource struct {
	// Devices records the devices the checkpoint could see, grouped by vendor.
	// +optional
	// +kubebuilder:pruning:PreserveUnknownFields
	Devices *CheckpointSourceDevices `json:"devices,omitempty"`

	// Node records the machine the snapshot was taken on.
	// +optional
	Node *CheckpointSourceNode `json:"node,omitempty"`

	// Pod records the container the snapshot was taken from.
	// +optional
	Pod *CheckpointSourcePod `json:"pod,omitempty"`
}

CheckpointSource publishes where a snapshot was taken, so someone preparing a restore target can see it without reading the snapshot. It is projected from the snapshot manifest and never read back: the restore compatibility gates compare the manifest, not this status.

Every field is optional. A value the agent could not read is absent rather than empty, and a snapshot taken before a value was recorded publishes without it.

func (*CheckpointSource) DeepCopy added in v0.2.0

func (in *CheckpointSource) DeepCopy() *CheckpointSource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CheckpointSource.

func (*CheckpointSource) DeepCopyInto added in v0.2.0

func (in *CheckpointSource) DeepCopyInto(out *CheckpointSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CheckpointSourceDevices added in v0.2.0

type CheckpointSourceDevices struct {
	// Nvidia records the NVIDIA GPUs the checkpoint could see.
	// +optional
	Nvidia *NvidiaCheckpointSource `json:"nvidia,omitempty"`
}

CheckpointSourceDevices groups source device details under one property per vendor, so each vendor's payload stays typed and validated and several can be present at once without a discriminator. A vendor this CRD has not heard of yet is preserved rather than pruned, so a newer agent's values survive an older installed CRD.

func (*CheckpointSourceDevices) DeepCopy added in v0.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CheckpointSourceDevices.

func (*CheckpointSourceDevices) DeepCopyInto added in v0.2.0

func (in *CheckpointSourceDevices) DeepCopyInto(out *CheckpointSourceDevices)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CheckpointSourceNode added in v0.2.0

type CheckpointSourceNode struct {
	// Name is the node the source pod ran on.
	// +optional
	Name string `json:"name,omitempty"`

	// Architecture is the node's CPU architecture, as GOARCH spells it.
	// +optional
	Architecture string `json:"architecture,omitempty"`

	// KernelVersion is the node's kernel release.
	// +optional
	KernelVersion string `json:"kernelVersion,omitempty"`

	// CPUFeatures are the instruction-set flags from the node's /proc/cpuinfo
	// that every processor reported, sorted. A restore needs a target that
	// offers all of them.
	// +optional
	CPUFeatures []string `json:"cpuFeatures,omitempty"`
}

CheckpointSourceNode is the machine a snapshot was taken on.

func (*CheckpointSourceNode) DeepCopy added in v0.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CheckpointSourceNode.

func (*CheckpointSourceNode) DeepCopyInto added in v0.2.0

func (in *CheckpointSourceNode) DeepCopyInto(out *CheckpointSourceNode)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CheckpointSourcePod added in v0.2.0

type CheckpointSourcePod struct {
	// Image is the container image reference the checkpoint ran.
	// +optional
	Image string `json:"image,omitempty"`

	// ImageDigest identifies which build of the container image the checkpoint
	// ran, which a mutable tag does not.
	// +optional
	ImageDigest string `json:"imageDigest,omitempty"`

	// Memory is the container's memory limit, absent if it had none.
	// +optional
	Memory string `json:"memory,omitempty"`

	// CPU is the container's CPU limit, absent if it had none.
	// +optional
	CPU string `json:"cpu,omitempty"`
}

CheckpointSourcePod is the container a snapshot was taken from, and what it was given to run in.

func (*CheckpointSourcePod) DeepCopy added in v0.2.0

func (in *CheckpointSourcePod) DeepCopy() *CheckpointSourcePod

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CheckpointSourcePod.

func (*CheckpointSourcePod) DeepCopyInto added in v0.2.0

func (in *CheckpointSourcePod) DeepCopyInto(out *CheckpointSourcePod)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CheckpointStorageBinding added in v0.3.0

type CheckpointStorageBinding struct {
	// StoreID is the versioned canonical storage identity shared with PageBroker.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`^store-v1-[0-9a-f]{64}$`
	// +kubebuilder:validation:MaxLength=73
	StoreID string `json:"storeID"`
}

CheckpointStorageBinding identifies the configured store owning a content's publications. It is not a transfer-engine choice or a credential reference.

func (*CheckpointStorageBinding) DeepCopy added in v0.3.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CheckpointStorageBinding.

func (*CheckpointStorageBinding) DeepCopyInto added in v0.3.0

func (in *CheckpointStorageBinding) DeepCopyInto(out *CheckpointStorageBinding)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CheckpointStorageStatus added in v0.3.0

type CheckpointStorageStatus struct {
	// Artifacts contains one descriptor per confirmed container. It can be
	// partial during a checkpoint or recovery; Ready still requires every container to finish.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=128
	// +listType=map
	// +listMapKey=containerName
	Artifacts []PublishedContainerArtifact `json:"artifacts"`
}

CheckpointStorageStatus holds confirmed publications. The store ID comes from immutable spec.storage; handles are meaningful only in that bound store.

func (*CheckpointStorageStatus) DeepCopy added in v0.3.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CheckpointStorageStatus.

func (*CheckpointStorageStatus) DeepCopyInto added in v0.3.0

func (in *CheckpointStorageStatus) DeepCopyInto(out *CheckpointStorageStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ContainerSnapshotConfig added in v0.3.0

type ContainerSnapshotConfig struct {
	// Name of the checkpointed container these settings apply to.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
	Name string `json:"name"`

	// CheckpointReadinessProbe tells when the application is safe to
	// checkpoint. When it is set, Snapshot waits for it instead of the
	// container's Ready condition. When it is omitted, Snapshot waits for the
	// container to be Ready, as before.
	// +optional
	CheckpointReadinessProbe *CheckpointReadinessProbe `json:"checkpointReadinessProbe,omitempty"`

	// Lifecycle holds actions Snapshot runs at points in the checkpoint and
	// restore lifecycle.
	// +optional
	Lifecycle *SnapshotLifecycle `json:"lifecycle,omitempty"`
}

ContainerSnapshotConfig holds the settings for one checkpointed container, matched to it by name. Snapshot copies them into the PodSnapshotContent at checkpoint time, and every restore of that snapshot uses that copy. +kubebuilder:validation:XValidation:rule="!has(self.checkpointReadinessProbe) || !has(self.checkpointReadinessProbe.file) || !has(self.lifecycle) || !has(self.lifecycle.postRestore) || !has(self.lifecycle.postRestore.file) || self.checkpointReadinessProbe.file.path != self.lifecycle.postRestore.file.path",message="checkpointReadinessProbe and lifecycle.postRestore must use different file paths"

func (*ContainerSnapshotConfig) DeepCopy added in v0.3.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerSnapshotConfig.

func (*ContainerSnapshotConfig) DeepCopyInto added in v0.3.0

func (in *ContainerSnapshotConfig) DeepCopyInto(out *ContainerSnapshotConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ControlFileAction added in v0.3.0

type ControlFileAction struct {
	// Path is an absolute, clean path inside the container: no empty, "." or
	// ".." parts and no trailing slash, so two paths name the same file only
	// if they are equal. Any path the container's user can reach works,
	// volumes included, except the files Snapshot itself writes in the
	// snapshot-control volume. A file on a volume that outlives the Pod stays
	// there for the next checkpoint or restore unless the application
	// removes it.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=2
	// +kubebuilder:validation:MaxLength=4096
	// +kubebuilder:validation:XValidation:rule="self.startsWith('/') && !self.endsWith('/') && !self.contains('//') && self.split('/').all(p, p != '.' && p != '..')",message="path must be absolute and clean: no empty, . or .. parts and no trailing slash"
	Path string `json:"path"`
}

ControlFileAction names a file inside the container's filesystem.

func (*ControlFileAction) DeepCopy added in v0.3.0

func (in *ControlFileAction) DeepCopy() *ControlFileAction

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlFileAction.

func (*ControlFileAction) DeepCopyInto added in v0.3.0

func (in *ControlFileAction) DeepCopyInto(out *ControlFileAction)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPGetAction added in v0.3.0

type HTTPGetAction struct {
	// Path of the request. Empty means "/".
	// +optional
	Path string `json:"path,omitempty"`

	// Port on the Pod IP: a number from 1 to 65535, or the name of a port of
	// the container, resolved when the request is sent.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:XIntOrString
	// +kubebuilder:validation:XValidation:rule="type(self) == int ? self >= 1 && self <= 65535 : self.size() > 0 && self.size() <= 15 && self.matches('^[a-z0-9]([-a-z0-9]*[a-z0-9])?$') && self.matches('[a-z]') && !self.contains('--')",message="port must be 1-65535 or a valid port name"
	Port intstr.IntOrString `json:"port"`
}

HTTPGetAction is a GET to a port on the Pod IP. Like Kubernetes' own httpGet, it has a path and a port. Snapshot does not follow redirects, so a 3xx fails. As with a Kubernetes probe, the Pod IP of a Pod on the host network is the node's IP.

func (*HTTPGetAction) DeepCopy added in v0.3.0

func (in *HTTPGetAction) DeepCopy() *HTTPGetAction

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPGetAction.

func (*HTTPGetAction) DeepCopyInto added in v0.3.0

func (in *HTTPGetAction) DeepCopyInto(out *HTTPGetAction)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPPostAction added in v0.3.0

type HTTPPostAction struct {
	// Path of the request. Empty means "/".
	// +optional
	Path string `json:"path,omitempty"`

	// Port on the Pod IP: a number from 1 to 65535, or the name of a port of
	// the container, resolved when the request is sent.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:XIntOrString
	// +kubebuilder:validation:XValidation:rule="type(self) == int ? self >= 1 && self <= 65535 : self.size() > 0 && self.size() <= 15 && self.matches('^[a-z0-9]([-a-z0-9]*[a-z0-9])?$') && self.matches('[a-z]') && !self.contains('--')",message="port must be 1-65535 or a valid port name"
	Port intstr.IntOrString `json:"port"`
}

HTTPPostAction is a POST with an empty body to a port on the Pod IP. Like Kubernetes' own httpGet, it has a path and a port. Snapshot does not follow redirects, so a 3xx fails. As with a Kubernetes probe, the Pod IP of a Pod on the host network is the node's IP. It is a separate type from HTTPGetAction so either can grow fields of its own.

func (*HTTPPostAction) DeepCopy added in v0.3.0

func (in *HTTPPostAction) DeepCopy() *HTTPPostAction

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPPostAction.

func (*HTTPPostAction) DeepCopyInto added in v0.3.0

func (in *HTTPPostAction) DeepCopyInto(out *HTTPPostAction)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NonTargetArtifactOnFailurePolicy added in v0.3.0

type NonTargetArtifactOnFailurePolicy string

NonTargetArtifactOnFailurePolicy controls only attempt-owned non-target bytes. +kubebuilder:validation:Enum=Retain;Cleanup

const (
	NonTargetArtifactRetain  NonTargetArtifactOnFailurePolicy = "Retain"
	NonTargetArtifactCleanup NonTargetArtifactOnFailurePolicy = "Cleanup"
)

type NonTargetArtifactPolicy added in v0.3.0

type NonTargetArtifactPolicy struct {
	// Containers names the regular non-target containers publishing extra bytes.
	// +kubebuilder:validation:MinItems=1
	// +listType=set
	// +kubebuilder:validation:items:MinLength=1
	// +kubebuilder:validation:items:MaxLength=63
	// +kubebuilder:validation:items:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
	Containers []string `json:"containers"`

	// OnFailure governs only these containers' UID-owned artifact directory.
	// +optional
	OnFailure NonTargetArtifactOnFailurePolicy `json:"onFailure,omitempty"`
}

NonTargetArtifactPolicy opts regular non-target containers into attempt-owned storage. Cleanup is permitted only for a positively failed attempt after writer termination is proven; omitted onFailure retains the bytes.

func (*NonTargetArtifactPolicy) DeepCopy added in v0.3.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NonTargetArtifactPolicy.

func (*NonTargetArtifactPolicy) DeepCopyInto added in v0.3.0

func (in *NonTargetArtifactPolicy) DeepCopyInto(out *NonTargetArtifactPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NvidiaCheckpointSource added in v0.2.0

type NvidiaCheckpointSource struct {
	// DriverVersion is the NVIDIA driver the checkpoint ran against.
	// +optional
	DriverVersion string `json:"driverVersion,omitempty"`

	// Instances lists one entry per GPU the checkpointed container could see, so
	// the count is the length of this list.
	// +optional
	Instances []NvidiaCheckpointSourceInstance `json:"instances,omitempty"`
}

NvidiaCheckpointSource is what the checkpoint saw of the node's NVIDIA GPUs. The field names are the ones the NVIDIA DRA driver publishes on a ResourceSlice, so the same GPU reads the same way in both places.

func (*NvidiaCheckpointSource) DeepCopy added in v0.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NvidiaCheckpointSource.

func (*NvidiaCheckpointSource) DeepCopyInto added in v0.2.0

func (in *NvidiaCheckpointSource) DeepCopyInto(out *NvidiaCheckpointSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NvidiaCheckpointSourceInstance added in v0.2.0

type NvidiaCheckpointSourceInstance struct {
	// ProductName is the GPU model, as nvidia-smi reports it.
	// +optional
	ProductName string `json:"productName,omitempty"`
}

NvidiaCheckpointSourceInstance is one GPU. UUIDs are deliberately left out: they identify a physical card rather than describe what a restore target has to match.

func (*NvidiaCheckpointSourceInstance) DeepCopy added in v0.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NvidiaCheckpointSourceInstance.

func (*NvidiaCheckpointSourceInstance) DeepCopyInto added in v0.2.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodReference

type PodReference struct {
	// Name of the source pod.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`

	// UID of the source pod, recorded so the node agent dumps that specific
	// pod and not a same-named recreation.
	// +optional
	UID types.UID `json:"uid,omitempty"`

	// Containers narrows the checkpoint to these containers of the source pod. The
	// node agent reads this instead of the source pod's target-container
	// annotation. v1alpha1 supports exactly one container; the cap is lifted when
	// the runtime supports more than one.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=1
	// +kubebuilder:validation:items:MinLength=1
	// +kubebuilder:validation:items:MaxLength=63
	// +kubebuilder:validation:items:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
	Containers []string `json:"containers"`
}

PodReference names a pod in the same namespace as the referencing PodSnapshot.

func (*PodReference) DeepCopy

func (in *PodReference) DeepCopy() *PodReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodReference.

func (*PodReference) DeepCopyInto

func (in *PodReference) DeepCopyInto(out *PodReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodSnapshot

type PodSnapshot struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="spec is immutable"
	Spec   PodSnapshotSpec   `json:"spec,omitempty"`
	Status PodSnapshotStatus `json:"status,omitempty"`
}

PodSnapshot is the Schema for the snapshots API. It is the namespaced binding for one container's snapshot and is consumed by restore paths.

No conversion: this type exists only in v1alpha1 (no other API version), so it is not part of any conversion scheme.

func (*PodSnapshot) DeepCopy

func (in *PodSnapshot) DeepCopy() *PodSnapshot

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSnapshot.

func (*PodSnapshot) DeepCopyInto

func (in *PodSnapshot) DeepCopyInto(out *PodSnapshot)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodSnapshot) DeepCopyObject

func (in *PodSnapshot) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PodSnapshotContent

type PodSnapshotContent struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="spec is immutable"
	Spec   PodSnapshotContentSpec   `json:"spec,omitempty"`
	Status PodSnapshotContentStatus `json:"status,omitempty"`
}

PodSnapshotContent is the Schema for the snapshotcontents API. It is the cluster-scoped record of one container's snapshot.

No conversion: this type exists only in v1alpha1 (no other API version), so it is not part of any conversion scheme.

func (*PodSnapshotContent) DeepCopy

func (in *PodSnapshotContent) DeepCopy() *PodSnapshotContent

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSnapshotContent.

func (*PodSnapshotContent) DeepCopyInto

func (in *PodSnapshotContent) DeepCopyInto(out *PodSnapshotContent)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodSnapshotContent) DeepCopyObject

func (in *PodSnapshotContent) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PodSnapshotContentList

type PodSnapshotContentList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PodSnapshotContent `json:"items"`
}

PodSnapshotContentList contains a list of PodSnapshotContent.

func (*PodSnapshotContentList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSnapshotContentList.

func (*PodSnapshotContentList) DeepCopyInto

func (in *PodSnapshotContentList) DeepCopyInto(out *PodSnapshotContentList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodSnapshotContentList) DeepCopyObject

func (in *PodSnapshotContentList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PodSnapshotContentSource

type PodSnapshotContentSource struct {
	// PodRef identifies the pod to dump. Its UID guards against dumping a
	// same-named recreation of the pod.
	// +kubebuilder:validation:Required
	PodRef PodReference `json:"podRef"`

	// NodeName is the node the source pod runs on, denormalized from the live
	// pod so it travels with PodRef as one immutable unit and selects the node
	// agent that performs the dump.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	NodeName string `json:"nodeName"`
}

PodSnapshotContentSource is the immutable source descriptor: what to dump (PodRef) and where it runs (NodeName).

func (*PodSnapshotContentSource) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSnapshotContentSource.

func (*PodSnapshotContentSource) DeepCopyInto

func (in *PodSnapshotContentSource) DeepCopyInto(out *PodSnapshotContentSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodSnapshotContentSpec

type PodSnapshotContentSpec struct {
	// PodSnapshotRef is the back-pointer to the bound PodSnapshot. It may span
	// namespaces because PodSnapshotContent is cluster-scoped.
	// +kubebuilder:validation:Required
	PodSnapshotRef PodSnapshotReference `json:"snapshotRef"`

	// Source describes what to checkpoint: the source pod and the node it runs on.
	// +kubebuilder:validation:Required
	Source PodSnapshotContentSource `json:"source"`

	// Storage binds this content to one configured store. Omitted on legacy
	// content; the producer will start writing it with artifact-flow integration.
	// Like the rest of spec it cannot be added, removed or changed after creation.
	// +optional
	Storage *CheckpointStorageBinding `json:"storage,omitempty"`

	// Containers is the PodSnapshot's container settings, with defaults
	// applied, saved at creation. Every restore of this snapshot uses them,
	// even if the PodSnapshot or SnapshotJob that asked for it changes or is
	// gone.
	// +optional
	// +listType=map
	// +listMapKey=name
	// +kubebuilder:validation:MaxItems=1
	Containers []ContainerSnapshotConfig `json:"containers,omitempty"`
}

PodSnapshotContentSpec defines the desired state of PodSnapshotContent. It is populated by the PodSnapshotReconciler (operator) at creation time and is immutable thereafter. +kubebuilder:validation:XValidation:rule="!has(self.containers) || self.containers.all(c, c.name in self.source.podRef.containers)",message="containers must name containers in source.podRef.containers"

func (*PodSnapshotContentSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSnapshotContentSpec.

func (*PodSnapshotContentSpec) DeepCopyInto

func (in *PodSnapshotContentSpec) DeepCopyInto(out *PodSnapshotContentSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodSnapshotContentStatus

type PodSnapshotContentStatus struct {
	// Conditions reflect the latest observations of the PodSnapshotContent's state.
	// Standard types are Ready and Failed.
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// Source publishes where the snapshot was taken, written when the content
	// goes Ready.
	// +optional
	Source *CheckpointSource `json:"source,omitempty"`

	// Storage records confirmed per-container publications. Existing filesystem
	// callers leave this absent; its presence does not replace Ready/Failed.
	// +optional
	Storage *CheckpointStorageStatus `json:"storage,omitempty"`
}

PodSnapshotContentStatus defines the observed state of PodSnapshotContent.

func (*PodSnapshotContentStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSnapshotContentStatus.

func (*PodSnapshotContentStatus) DeepCopyInto

func (in *PodSnapshotContentStatus) DeepCopyInto(out *PodSnapshotContentStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodSnapshotList

type PodSnapshotList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PodSnapshot `json:"items"`
}

PodSnapshotList contains a list of PodSnapshot.

func (*PodSnapshotList) DeepCopy

func (in *PodSnapshotList) DeepCopy() *PodSnapshotList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSnapshotList.

func (*PodSnapshotList) DeepCopyInto

func (in *PodSnapshotList) DeepCopyInto(out *PodSnapshotList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodSnapshotList) DeepCopyObject

func (in *PodSnapshotList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PodSnapshotReference

type PodSnapshotReference struct {
	// Namespace of the referenced PodSnapshot.
	// +kubebuilder:validation:Required
	Namespace string `json:"namespace"`

	// Name of the referenced PodSnapshot.
	// +kubebuilder:validation:Required
	Name string `json:"name"`

	// UID of the referenced PodSnapshot, recorded at binding time to detect a
	// stale reference after a delete and recreate.
	// +optional
	UID types.UID `json:"uid,omitempty"`
}

PodSnapshotReference is a cross-namespace reference to a PodSnapshot.

func (*PodSnapshotReference) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSnapshotReference.

func (*PodSnapshotReference) DeepCopyInto

func (in *PodSnapshotReference) DeepCopyInto(out *PodSnapshotReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodSnapshotSource

type PodSnapshotSource struct {
	// PodRef references the pod, in the PodSnapshot's namespace, that is checkpointed.
	// The operator prepares the pod (the snapshot-control volume) before creating
	// the PodSnapshot; the snapshot store is mounted by the node agent, not the
	// pod. The target container is carried on PodRef.Containers, not a pod
	// annotation.
	// +kubebuilder:validation:Required
	PodRef PodReference `json:"podRef"`
}

PodSnapshotSource identifies the workload a PodSnapshot was taken from.

func (*PodSnapshotSource) DeepCopy

func (in *PodSnapshotSource) DeepCopy() *PodSnapshotSource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSnapshotSource.

func (*PodSnapshotSource) DeepCopyInto

func (in *PodSnapshotSource) DeepCopyInto(out *PodSnapshotSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodSnapshotSpec

type PodSnapshotSpec struct {
	// Source identifies the checkpointed workload. It is a struct (rather than an
	// inlined reference) so future source variants can be added additively.
	// +kubebuilder:validation:Required
	Source PodSnapshotSource `json:"source"`

	// Containers holds settings for the checkpointed containers, matched by
	// name to source.podRef.containers. It is a separate list so settings stay
	// the same when other kinds of source are added.
	// +optional
	// +listType=map
	// +listMapKey=name
	// +kubebuilder:validation:MaxItems=1
	Containers []ContainerSnapshotConfig `json:"containers,omitempty"`
}

PodSnapshotSpec defines the desired state of PodSnapshot. +kubebuilder:validation:XValidation:rule="!has(self.containers) || self.containers.all(c, c.name in self.source.podRef.containers)",message="containers must name containers in source.podRef.containers"

func (*PodSnapshotSpec) DeepCopy

func (in *PodSnapshotSpec) DeepCopy() *PodSnapshotSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSnapshotSpec.

func (*PodSnapshotSpec) DeepCopyInto

func (in *PodSnapshotSpec) DeepCopyInto(out *PodSnapshotSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodSnapshotStatus

type PodSnapshotStatus struct {
	// BoundPodSnapshotContentName is the name of the cluster-scoped PodSnapshotContent
	// this PodSnapshot is bound to. It is nil until the agent has created the
	// content and recorded the binding.
	// +optional
	BoundPodSnapshotContentName *string `json:"boundSnapshotContentName,omitempty"`

	// Conditions reflect the latest observations of the PodSnapshot's state.
	// Standard types are Ready and Failed.
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

PodSnapshotStatus defines the observed state of PodSnapshot.

func (*PodSnapshotStatus) DeepCopy

func (in *PodSnapshotStatus) DeepCopy() *PodSnapshotStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSnapshotStatus.

func (*PodSnapshotStatus) DeepCopyInto

func (in *PodSnapshotStatus) DeepCopyInto(out *PodSnapshotStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodSnapshotTemplate

type PodSnapshotTemplate struct {
	// Metadata contains labels and annotations copied to the generated
	// PodSnapshot. SnapshotJob ownership labels are reserved for the controller
	// and cannot be supplied here.
	// +optional
	Metadata *PodSnapshotTemplateMetadata `json:"metadata,omitempty"`

	// TargetContainers names the container(s) to checkpoint with CRIU. The pod
	// may contain any number of additional containers (helpers, sidecars, etc.)
	// — this field controls only the CRIU dump target.
	//
	// v1alpha1: exactly one target is required. The plural form is
	// intentional: future versions may checkpoint more than one container.
	// Per-container settings go in containers, not here.
	//
	// Defaults to ["main"]. Each entry must be a valid DNS label
	// (1-63 chars, ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$).
	// +optional
	// +kubebuilder:default={"main"}
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=1
	// +kubebuilder:validation:items:MinLength=1
	// +kubebuilder:validation:items:MaxLength=63
	// +kubebuilder:validation:items:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
	TargetContainers []string `json:"targetContainers,omitempty"`

	// Containers is copied to the generated PodSnapshot: settings for the
	// checkpointed containers, matched by name to targetContainers.
	// +optional
	// +listType=map
	// +listMapKey=name
	// +kubebuilder:validation:MaxItems=1
	Containers []ContainerSnapshotConfig `json:"containers,omitempty"`
}

PodSnapshotTemplate mirrors the PodSnapshot fields the user controls. The controller fills in identity, ownership, and spec.source automatically. +kubebuilder:validation:XValidation:rule="!has(self.metadata) || !has(self.metadata.labels) || !('nvidia.com/snapshot-job' in self.metadata.labels)",message="metadata.labels must not set controller-owned label nvidia.com/snapshot-job" +kubebuilder:validation:XValidation:rule="!has(self.metadata) || !has(self.metadata.labels) || !('nvidia.com/snapshot-job-uid' in self.metadata.labels)",message="metadata.labels must not set controller-owned label nvidia.com/snapshot-job-uid" +kubebuilder:validation:XValidation:rule="!has(self.containers) || self.containers.all(c, c.name in self.targetContainers)",message="containers must name containers in targetContainers"

func (*PodSnapshotTemplate) DeepCopy

func (in *PodSnapshotTemplate) DeepCopy() *PodSnapshotTemplate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSnapshotTemplate.

func (*PodSnapshotTemplate) DeepCopyInto

func (in *PodSnapshotTemplate) DeepCopyInto(out *PodSnapshotTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodSnapshotTemplateMetadata

type PodSnapshotTemplateMetadata struct {
	// Labels are copied to the generated PodSnapshot.
	// +optional
	// +kubebuilder:validation:MaxProperties=4096
	Labels map[string]string `json:"labels,omitempty"`

	// Annotations are copied to the generated PodSnapshot.
	// +optional
	// +kubebuilder:validation:MaxProperties=4096
	Annotations map[string]string `json:"annotations,omitempty"`
}

PodSnapshotTemplateMetadata is the caller-owned metadata propagated to a SnapshotJob's generated PodSnapshot. It intentionally exposes only labels and annotations; identity and ownership remain controller-owned. The SnapshotJob spec is immutable, so metadata rejected by the controller as InvalidSpec requires deleting and recreating the SnapshotJob. +kubebuilder:validation:XValidation:rule="!has(self.labels) || self.labels.all(k, !format.qualifiedName().validate(k).hasValue())",message="metadata.labels keys must be valid Kubernetes qualified names" +kubebuilder:validation:XValidation:rule="!has(self.labels) || self.labels.all(k, size(self.labels[k]) <= 63)",message="metadata.labels values must be no more than 63 characters" +kubebuilder:validation:XValidation:rule="!has(self.annotations) || self.annotations.all(k, !format.qualifiedName().validate(k).hasValue())",message="metadata.annotations keys must be valid Kubernetes qualified names"

func (*PodSnapshotTemplateMetadata) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSnapshotTemplateMetadata.

func (*PodSnapshotTemplateMetadata) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PostRestoreAction added in v0.3.0

type PostRestoreAction struct {
	PostRestoreHandler `json:",inline"`

	// PeriodSeconds is the time between attempts.
	// +optional
	// +kubebuilder:default=1
	// +kubebuilder:validation:Minimum=1
	PeriodSeconds int32 `json:"periodSeconds,omitempty"`

	// TimeoutSeconds limits each attempt.
	// +optional
	// +kubebuilder:default=1
	// +kubebuilder:validation:Minimum=1
	TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"`
}

PostRestoreAction tells a restored application that it may resume. Snapshot retries it every periodSeconds until it succeeds or the restore deadline passes; the restore succeeds only after it does. The application must handle the same notification more than once. +kubebuilder:validation:XValidation:rule="has(self.file) != has(self.httpPost)",message="set exactly one of file or httpPost"

func (*PostRestoreAction) DeepCopy added in v0.3.0

func (in *PostRestoreAction) DeepCopy() *PostRestoreAction

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostRestoreAction.

func (*PostRestoreAction) DeepCopyInto added in v0.3.0

func (in *PostRestoreAction) DeepCopyInto(out *PostRestoreAction)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PostRestoreHandler added in v0.3.0

type PostRestoreHandler struct {
	// File creates an empty regular file at the path, inside the container.
	// Like an exec probe, Snapshot creates it by running a shell in the
	// container, as the container's user, so the image needs a shell. The
	// parent directory must exist. The file must not exist before the
	// restore: Snapshot takes an existing file as the notification.
	// +optional
	File *ControlFileAction `json:"file,omitempty"`

	// HTTPPost sends a POST with an empty body to the Pod IP. A 2xx status
	// means the application accepted the notification. Snapshot does not
	// follow redirects, so a 3xx fails.
	// +optional
	HTTPPost *HTTPPostAction `json:"httpPost,omitempty"`
}

PostRestoreHandler is how Snapshot notifies the restored application.

func (*PostRestoreHandler) DeepCopy added in v0.3.0

func (in *PostRestoreHandler) DeepCopy() *PostRestoreHandler

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostRestoreHandler.

func (*PostRestoreHandler) DeepCopyInto added in v0.3.0

func (in *PostRestoreHandler) DeepCopyInto(out *PostRestoreHandler)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PublishedContainerArtifact added in v0.3.0

type PublishedContainerArtifact struct {
	// ContainerName selects the checkpointed container within the content.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
	ContainerName string `json:"containerName"`

	// ArtifactHandle is an opaque locator within the bound store.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=4096
	// +kubebuilder:validation:Pattern=`\S`
	ArtifactHandle string `json:"artifactHandle"`
}

PublishedContainerArtifact is the persisted part of PageBroker's PublishedArtifact, associated with a checkpointed container. Readers pass the handle back unchanged; they must not construct filesystem paths.

func (*PublishedContainerArtifact) DeepCopy added in v0.3.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PublishedContainerArtifact.

func (*PublishedContainerArtifact) DeepCopyInto added in v0.3.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SnapshotJob

type SnapshotJob struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="spec is immutable"
	Spec   SnapshotJobSpec   `json:"spec"`
	Status SnapshotJobStatus `json:"status,omitempty"`
}

SnapshotJob is the Schema for the snapshotjobs API. It fuses running a checkpoint-ready workload pod and checkpointing it into a PodSnapshot into one declarative, checkpoint-only object. SnapshotJob has zero awareness of any specific consumer (Dynamo, GMS, or otherwise).

No conversion: this type exists only in v1alpha1 (no other API version), so it is not part of any conversion scheme.

func (*SnapshotJob) DeepCopy

func (in *SnapshotJob) DeepCopy() *SnapshotJob

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotJob.

func (*SnapshotJob) DeepCopyInto

func (in *SnapshotJob) DeepCopyInto(out *SnapshotJob)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SnapshotJob) DeepCopyObject

func (in *SnapshotJob) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SnapshotJobList

type SnapshotJobList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []SnapshotJob `json:"items"`
}

SnapshotJobList contains a list of SnapshotJob.

func (*SnapshotJobList) DeepCopy

func (in *SnapshotJobList) DeepCopy() *SnapshotJobList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotJobList.

func (*SnapshotJobList) DeepCopyInto

func (in *SnapshotJobList) DeepCopyInto(out *SnapshotJobList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SnapshotJobList) DeepCopyObject

func (in *SnapshotJobList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SnapshotJobSpec

type SnapshotJobSpec struct {
	// PodTemplate defines the workload to run and checkpoint. The controller injects
	// the snapshot contract (control volume, readiness probe, seccomp, sidecar
	// opt-outs) before creating the batch/v1 Job. Everything else — image,
	// command, GPU resources, sidecars, DRA claims, shared memory — is the
	// caller's responsibility.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:XValidation:rule="!has(self.metadata) || !has(self.metadata.annotations) || !('nvidia.com/snapshot-multi-gpu' in self.metadata.annotations) || self.metadata.annotations['nvidia.com/snapshot-multi-gpu'].trim() in ['enabled', 'disabled']",message="annotation nvidia.com/snapshot-multi-gpu must be enabled or disabled"
	PodTemplate corev1.PodTemplateSpec `json:"podTemplate"`

	// ActiveDeadlineSeconds bounds the total time allowed for pod scheduling,
	// quiesce, and dump. Applied verbatim to the batch/v1 Job.
	// +optional
	// +kubebuilder:default=3600
	// +kubebuilder:validation:Minimum=1
	ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`

	// NonTargetArtifacts declares regular non-target writers and their opt-in
	// failed-attempt cleanup policy. Omission retains their bytes and does not
	// change snapshot or source-object deletion. The controller derives
	// the source Pod annotation from this typed declaration.
	// +optional
	NonTargetArtifacts *NonTargetArtifactPolicy `json:"nonTargetArtifacts,omitempty"`

	// PodSnapshotTemplate defines the properties of the PodSnapshot produced by
	// this job. The controller fills in spec.source from the pod it creates.
	// +kubebuilder:validation:Required
	PodSnapshotTemplate PodSnapshotTemplate `json:"podSnapshotTemplate"`
}

SnapshotJobSpec defines the desired state of SnapshotJob. +kubebuilder:validation:XValidation:rule="self.podSnapshotTemplate.targetContainers.all(c, c in self.podTemplate.spec.containers.map(x, x.name))",message="targetContainers must name containers present in podTemplate" +kubebuilder:validation:XValidation:rule="!has(self.nonTargetArtifacts) || !has(self.podTemplate.metadata) || !has(self.podTemplate.metadata.annotations) || !('nvidia.com/snapshot-non-target-artifact-containers' in self.podTemplate.metadata.annotations)",message="nonTargetArtifacts and the legacy container annotation cannot both be set" +kubebuilder:validation:XValidation:rule="!has(self.nonTargetArtifacts) || self.nonTargetArtifacts.containers.all(c, !(c in self.podSnapshotTemplate.targetContainers))",message="nonTargetArtifacts.containers must not name target containers"

func (*SnapshotJobSpec) DeepCopy

func (in *SnapshotJobSpec) DeepCopy() *SnapshotJobSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotJobSpec.

func (*SnapshotJobSpec) DeepCopyInto

func (in *SnapshotJobSpec) DeepCopyInto(out *SnapshotJobSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SnapshotJobStatus

type SnapshotJobStatus struct {
	// SourceJobUID identifies the one source batch/v1 Job incarnation accepted
	// for this one-shot SnapshotJob. Once set, a missing Job or a same-name Job
	// with another UID is terminal and must never cause the workload to run again.
	// +optional
	SourceJobUID types.UID `json:"sourceJobUID,omitempty"`

	// PodSnapshotName is the name of the PodSnapshot produced by this job. Set
	// when the PodSnapshot is created. Distinguishes "never created" (empty)
	// from "created but missing" (set, not found).
	// +optional
	PodSnapshotName string `json:"podSnapshotName,omitempty"`

	// PodSnapshotUID identifies the one PodSnapshot incarnation accepted for
	// this one-shot checkpoint. Once set, a missing PodSnapshot or a same-name
	// object with another UID is terminal and must never start another checkpoint.
	// +optional
	PodSnapshotUID types.UID `json:"podSnapshotUID,omitempty"`

	// StartedAt is when the controller first observed the source pod Ready
	// (job.status.ready > 0), not the pod's own Ready transition time — it can
	// lag the pod's actual transition by up to one reconcile interval.
	// +optional
	StartedAt *metav1.Time `json:"startedAt,omitempty"`

	// CompletedAt is when a terminal condition (Completed or Failed) was set.
	// +optional
	CompletedAt *metav1.Time `json:"completedAt,omitempty"`

	// Conditions reflect the current state of the SnapshotJob. Types: Running,
	// Captured, Completed, Failed.
	// +optional
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

SnapshotJobStatus defines the observed state of SnapshotJob.

func (*SnapshotJobStatus) DeepCopy

func (in *SnapshotJobStatus) DeepCopy() *SnapshotJobStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotJobStatus.

func (*SnapshotJobStatus) DeepCopyInto

func (in *SnapshotJobStatus) DeepCopyInto(out *SnapshotJobStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SnapshotLifecycle added in v0.3.0

type SnapshotLifecycle struct {
	// PostRestore tells the application, after Snapshot restored its process
	// and GPU state, that it may resume.
	// +optional
	PostRestore *PostRestoreAction `json:"postRestore,omitempty"`
}

SnapshotLifecycle holds actions Snapshot runs at points in the checkpoint and restore lifecycle.

func (*SnapshotLifecycle) DeepCopy added in v0.3.0

func (in *SnapshotLifecycle) DeepCopy() *SnapshotLifecycle

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotLifecycle.

func (*SnapshotLifecycle) DeepCopyInto added in v0.3.0

func (in *SnapshotLifecycle) DeepCopyInto(out *SnapshotLifecycle)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Directories

Path Synopsis
Package crds embeds the CustomResourceDefinitions controller-gen generates from the v1alpha1 types.
Package crds embeds the CustomResourceDefinitions controller-gen generates from the v1alpha1 types.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL