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
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.4
helm.sh/resource-policy: keep
name: snapshotcontents.nvidia.com
spec:
group: nvidia.com
names:
kind: SnapshotContent
listKind: SnapshotContentList
plural: snapshotcontents
shortNames:
- snapcontent
singular: snapshotcontent
scope: Cluster
versions:
- additionalPrinterColumns:
- description: Bound Snapshot
jsonPath: .spec.snapshotRef.name
name: Snapshot
type: string
- description: Snapshot namespace
jsonPath: .spec.snapshotRef.namespace
name: Namespace
type: string
- description: Ready condition
jsonPath: .status.conditions[?(@.type=='Ready')].status
name: Ready
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1
schema:
openAPIV3Schema:
description: |-
SnapshotContent is the Schema for the snapshotcontents API. It is the
cluster-scoped artifact-of-record for a captured container checkpoint.
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: |-
SnapshotContentSpec defines the desired state of SnapshotContent. It is
populated by the node agent at creation time and is immutable thereafter.
properties:
snapshotRef:
description: |-
SnapshotRef is the back-pointer to the bound Snapshot. It may span
namespaces because SnapshotContent is cluster-scoped.
properties:
name:
description: Name of the referenced Snapshot.
type: string
namespace:
description: Namespace of the referenced Snapshot.
type: string
uid:
description: |-
UID of the referenced Snapshot, recorded at binding time to detect a
stale reference after a delete and recreate.
type: string
required:
- name
- namespace
type: object
source:
description: Source locates the physical artifact via a self-contained, opaque handle.
properties:
snapshotHandle:
description: |-
SnapshotHandle is a self-contained, opaque artifact locator. The v1alpha1
PVC format is:
pvc://<namespace>/<claimName>/<basePath>/<checkpointID>/versions/<version>
It fully locates the artifact without correlating any other field.
minLength: 1
type: string
required:
- snapshotHandle
type: object
required:
- snapshotRef
- source
type: object
status:
description: SnapshotContentStatus defines the observed state of SnapshotContent.
properties:
conditions:
description: |-
Conditions reflect the latest observations of the SnapshotContent's state.
Standard types are Ready and Failed.
items:
description: Condition contains details for one aspect of the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: |-
message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: |-
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: |-
reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
snapshotHandle:
description: |-
SnapshotHandle mirrors spec.source.snapshotHandle once the node agent has
verified the artifact.
type: string
type: object
type: object
x-kubernetes-validations:
- message: spec is immutable
rule: '!has(oldSelf.spec) || self.spec == oldSelf.spec'
served: true
storage: true
subresources:
status: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.4
helm.sh/resource-policy: keep
name: snapshots.nvidia.com
spec:
group: nvidia.com
names:
kind: Snapshot
listKind: SnapshotList
plural: snapshots
shortNames:
- snap
singular: snapshot
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Artifact identity
jsonPath: .spec.checkpointID
name: CheckpointID
type: string
- description: Bound SnapshotContent
jsonPath: .status.boundSnapshotContentName
name: Content
type: string
- description: Ready condition
jsonPath: .status.conditions[?(@.type=='Ready')].status
name: Ready
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1
schema:
openAPIV3Schema:
description: |-
Snapshot is the Schema for the snapshots API. It is the namespaced binding
for a captured container checkpoint and is consumed by restore paths.
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: |-
SnapshotSpec defines the desired state of Snapshot.

Minimal "trigger" shape: it names what to capture (an existing pod) and the
artifact identity (CheckpointID). Capture parameters the node agent needs at
dump time (target container, storage base path) are read from the referenced
pod's existing annotations and mounts, not duplicated here. The spec is
immutable after creation.
properties:
checkpointID:
description: |-
CheckpointID is the stable artifact identity and the on-PVC artifact
subdirectory name (<basePath>/<checkpointID>/versions/<version>/). It is
the primary key of the storage contract shared with the restore path and
is immutable after creation.
maxLength: 253
minLength: 1
type: string
source:
description: |-
Source identifies the captured workload. It is a struct (rather than an
inlined reference) so future source variants can be added additively.
properties:
podRef:
description: |-
PodRef references the pod, in the Snapshot's namespace, that is captured.
The operator prepares the pod (control volume, target-container annotation,
checkpoint storage mount) before creating the Snapshot.
properties:
name:
description: Name of the source pod.
minLength: 1
type: string
required:
- name
type: object
required:
- podRef
type: object
required:
- checkpointID
- source
type: object
status:
description: SnapshotStatus defines the observed state of Snapshot.
properties:
boundSnapshotContentName:
description: |-
BoundSnapshotContentName is the name of the cluster-scoped SnapshotContent
this Snapshot is bound to. It is nil until the agent has created the
content and recorded the binding.
type: string
conditions:
description: |-
Conditions reflect the latest observations of the Snapshot's state.
Standard types are Ready and Failed.
items:
description: Condition contains details for one aspect of the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: |-
message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: |-
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: |-
reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
type: object
type: object
x-kubernetes-validations:
- message: spec is immutable
rule: '!has(oldSelf.spec) || self.spec == oldSelf.spec'
served: true
storage: true
subresources:
status: {}
Loading
Loading