MAQPNADocs

AgentSessionSnapshot

AgentSessionSnapshot (maqpna.com/v1alpha1): every field, type, default and validation rule, generated from the CRD schema.

AgentSessionSnapshot is a point-in-time capture of an AgentSession that new sessions fork (or resume) from via spec.fork.fromSnapshot.

At a glance#

Property Value
API version maqpna.com/v1alpha1
Kind AgentSessionSnapshot
Scope Namespaced
Plural agentsessionsnapshots
Short names asnap, snap
Categories maqpna
Status subresource yes
kubectl get agentsessionsnapshots -A
kubectl get asnap <name> -o yaml
kubectl explain agentsessionsnapshots.spec

Columns in kubectl get#

Column Type From
Session string .spec.sessionRef
Phase string .status.phase
Strategy string .status.strategy
Forks integer .status.forks
Age date .metadata.creationTimestamp

Example#

From config/samples/agentsessionsnapshot-rl.yaml:

# F-22: capture a session (CSI VolumeSnapshot of its workspace, or an
# upstream sandbox snapshot with --sandbox-snapshot-api), then fan out RL
# rollouts: every AgentSession with fork.fromSnapshot gets its own identity
# (maqpna_parent_session), inherits the parent's taint and rolls its spend
# up to the parent's budget.
apiVersion: maqpna.com/v1alpha1
kind: AgentSessionSnapshot
metadata:
  name: coder-session-1-warm
  namespace: team-a
spec:
  sessionRef: coder-session-1
  strategy: Auto
---
apiVersion: maqpna.com/v1alpha1
kind: AgentSession
metadata:
  name: coder-rollout-1
  namespace: team-a
spec:
  agentRef: coder
  user: [email protected]
  ttl: 30m
  fork:
    fromSnapshot: coder-session-1-warm

Spec fields#

AgentSessionSnapshotSpec requests a point-in-time capture of a session.

Field Type Required Description
sessionRef string yes sessionRef is the AgentSession (same namespace) to capture. It may be Running or Suspended (a suspended session's workspace is quiescent, so its VolumeSnapshot is consistent). Min length: 1. Max length: 253.
strategy string strategy: Auto (default), SandboxSnapshot or VolumeSnapshot. One of: Auto, SandboxSnapshot, VolumeSnapshot. Default: "Auto".
volumeSnapshotClassName string volumeSnapshotClassName overrides Agent.spec.workspace.volumeSnapshotClassName.
  • Rule on spec: spec.sessionRef is immutable

Status fields#

AgentSessionSnapshotStatus is the observed state of a snapshot.

The operator writes status; do not set it yourself.

Field Type Required Description
capturedAt string (date-time) capturedAt is when the snapshot became Ready.
conditions []object
conditions[].lastTransitionTime string (date-time) yes 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.
conditions[].message string yes message is a human readable message indicating details about the transition. This may be an empty string. Max length: 32768.
conditions[].observedGeneration integer (int64) 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. Minimum: 0.
conditions[].reason string yes 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. Min length: 1. Max length: 1024. Pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$.
conditions[].status string yes status of the condition, one of True, False, Unknown. One of: True, False, Unknown.
conditions[].type string yes type of condition in CamelCase or in foo.example.com/CamelCase. Max length: 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])$.
forks integer (int32) forks counts sessions restored from this snapshot (RL fan-out).
message string
phase string SnapshotPhase is the lifecycle phase of an AgentSessionSnapshot. One of: Pending, Capturing, Ready, Failed.
sandboxSnapshotName string sandboxSnapshotName is the upstream snapshot (SandboxSnapshot strategy).
source object source describes the captured session.
source.agent string yes
source.groups []string
source.phase string phase of the source session at capture time. One of: Pending, Provisioning, Running, Suspended, Completed, Failed.
source.rootSession string rootSession is the first session of the fork lineage (the source itself unless it was a fork); child spend rolls up to it.
source.scopes []string
source.session string yes
source.taints []string taints are the source session's taint labels at capture time (from the gateway's maqpna.com/taints annotation); forks inherit them.
source.user string yes
strategy string strategy actually used.
volumeSnapshotName string volumeSnapshotName is the VolumeSnapshot (VolumeSnapshot strategy).