Skip to main content

PerformanceCapture

Requests a performance capture for a target workload and records the resulting artifacts.

platform.prokrust.ai/v1beta1 · Namespaced · performancecaptures

Controller status​

Read status.phase, status.reason, and status.message to track the capture. The capture has its own outcome, separate from the profiled workload.

Phase or reasonWhat to check
Armed, Capturing, FinalizingThe controller has prepared the capture, is collecting data, or is processing the result. Check status.identity when present to confirm the target pod and container.
ReadyThe capture completed. Use status.artifact for the stored profile. A successful CPU export also supplies status.flamegraph.
PartialInspect the reason before using the profile. For NoSamplesInSelectedWindow, choose a window when the target process is active. For CollectorExitedBeforeWindow, the CPU collector stopped early. Check status.artifact for a partial profile.
UnsupportedFor ProfilingDisabled, check installation profiling settings. For a CPU capture with NoRunningTarget, check whether the target pod and container are running. With AmbiguousTargetSelectPodAndContainer, specify the pod and container to select one target. For CudaCaptureToolingUnavailable, check the training target and installed CUDA profiling tools. Use step-based triggers for CaptureTriggerUnsupported. For CaptureMustBeArmedBeforeLaunch, request CUDA capture before the initial training plan is frozen.
FailedInspect the reason. CollectorJobDisappeared means the collector Job was lost. For CaptureExportFailed, inspect the collector result and artifact storage access.
CancelledThe controller stopped the capture. Check status.cleanupComplete for cleanup of the capture resources.

For a CUDA capture, the controller can copy the reason from the worker receipt. Read the reason and inspect the target training attempt.

A terminal phase can appear before cleanup finishes. If the reason is CaptureLaunchUnresolved, the controller retains the cleanup finalizer until it can establish the outcome of the collector launch.

Profiling disabled

The installation has profiling disabled. The controller records the outcome on the capture.

status:
phase: Unsupported
reason: ProfilingDisabled

Check the installation's profiling settings before submitting another capture.

How to read status fields
FieldWhat it tells you
status.artifactReference to the captured profiling data. Use it to retrieve the output for this target and capture interval.
status.cleanupCompleteReports whether cleanup has finished. A terminal outcome can be visible before all resources have been released.
status.finishedAtTime the controller recorded the terminal outcome. Use it with the start time to determine elapsed execution time.
status.flamegraphReference to the published flame graph when available. Open the artifact to inspect where the profiled workload spent time.
status.identityIdentifies the capture target selected by the controller. Compare it with the intended workload when reviewing a capture.
status.jobRefReference to the capture job. Inspect it to diagnose a capture that did not finish.
status.messageController details for the reported reason. Inspect the message to identify the target or operation that needs attention.
status.phaseCurrent stage reported by the controller. Use the conditions or failure details to diagnose why progress stopped.
status.reasonMachine-readable reason for the current capture state. Inspect the message for details about that reason.
status.startedAtTime the controller recorded the start of execution. Use it when investigating an active or delayed operation.
Kubernetes schema for status

Required applies when the parent is present. A dash in the default column means the CRD declares no default.

FieldTypeRequiredDefaultSchema constraints and descriptions
statusobjectno—maxProperties 1024 · nullable true
status.artifactobjectno—Reference to the captured profiling data. Use it to retrieve the output for this target and capture interval. · maxProperties 1024 · nullable true · self.sizeBytes >= 0 && self.sizeBytes <= 9007199254740991
status.artifact.digeststringyes—SHA-256 digest of the artifact contents. Compare it with the downloaded bytes to verify the artifact. · maxLength 71 · pattern "^sha256:[0-9a-f]{64}$" · self.matches('^sha256:[0-9a-f]{64}$')
status.artifact.mediaTypestringyes—Use the recorded media type to identify the artifact representation. · maxLength 2048
status.artifact.sizeBytesintegeryes—Use the published byte count when verifying a transferred artifact. · format "int64"
status.artifact.uristringyes—Use this location to identify the published artifact during retrieval or diagnostics. · maxLength 2048
status.cleanupCompletebooleannofalseReports whether cleanup has finished. A terminal outcome can be visible before all resources have been released.
status.finishedAtstringno—Time the controller recorded the terminal outcome. Use it with the start time to determine elapsed execution time. · maxLength 2048 · nullable true
status.flamegraphobjectno—Reference to the published flame graph when available. Open the artifact to inspect where the profiled workload spent time. · maxProperties 1024 · nullable true · self.sizeBytes >= 0 && self.sizeBytes <= 9007199254740991
status.flamegraph.digeststringyes—SHA-256 digest of the artifact contents. Compare it with the downloaded bytes to verify the artifact. · maxLength 71 · pattern "^sha256:[0-9a-f]{64}$" · self.matches('^sha256:[0-9a-f]{64}$')
status.flamegraph.mediaTypestringyes—Use the recorded media type to identify the artifact representation. · maxLength 2048
status.flamegraph.sizeBytesintegeryes—Use the published byte count when verifying a transferred artifact. · format "int64"
status.flamegraph.uristringyes—Use this location to identify the published artifact during retrieval or diagnostics. · maxLength 2048
status.identityobjectno—Identifies the capture target selected by the controller. Compare it with the intended workload when reviewing a capture. · maxProperties 1024 · nullable true
status.identity.attemptUidstringno—maxLength 128 · nullable true
status.identity.containerIdstringyes—maxLength 2048
status.identity.containerNamestringyes—maxLength 253
status.identity.imageIdstringyes—maxLength 2048
status.identity.namespaceUidstringyes—maxLength 128
status.identity.nodeNamestringyes—maxLength 253
status.identity.podNamestringyes—maxLength 253
status.identity.podUidstringyes—maxLength 128
status.identity.targetUidstringyes—maxLength 128
status.jobRefobjectno—Reference to the capture job. Inspect it to diagnose a capture that did not finish. · maxProperties 1024 · nullable true
status.jobRef.apiVersionstringyes—maxLength 2048
status.jobRef.executionDigeststringno—maxLength 71 · nullable true · pattern "^sha256:[0-9a-f]{64}$"
status.jobRef.kindstringyes—maxLength 2048
status.jobRef.namestringyes—maxLength 253
status.jobRef.recoveryOrdinalintegerno—format "int32" · nullable true
status.jobRef.uidstringyes—maxLength 128
status.messagestringno—Controller details for the reported reason. Inspect the message to identify the target or operation that needs attention. · maxLength 1024 · nullable true
status.phasestringno"Pending"Current stage reported by the controller. Use the conditions or failure details to diagnose why progress stopped. · enum ["Pending","Armed","Capturing","Finalizing","Ready","Partial","Failed","Unsupported","Cancelled"] · maxLength 2048
status.reasonstringno—Machine-readable reason for the current capture state. Inspect the message for details about that reason. · maxLength 128 · nullable true
status.startedAtstringno—Time the controller recorded the start of execution. Use it when investigating an active or delayed operation. · maxLength 2048 · nullable true

Specification​

Select the workload to profile, the capture mode, and its duration.

This resource requires mode, targetRef, workspaceUid.

durationSeconds​

Upper time bound for this capture. Choose a shorter window for a brief CPU spike or a longer window for intermittent activity.

mode​

Cpu samples a running process. Cuda profiles a training window and must be armed before the initial plan is frozen.

sampleRateHz​

CPU sampling frequency in samples per second. A higher rate can resolve shorter activity at the cost of more sampling work.

targetRef​

Identifies the workload to profile. Include its current object UID so a replacement with the same name cannot become the target.

FieldWhen to use it
spec.targetRef.attemptUidIdentifies one execution attempt. Use it when a retry and an earlier attempt belong to the same target.
spec.targetRef.containerNameContainer within the selected pod. Use the name reported for the target process when a pod has multiple containers.
spec.targetRef.kindSelects the workload type that owns the process of interest, such as TrainingRun for a trainer or BallistaCluster for an executor.
spec.targetRef.nameName of the target resource. Use the name of the workload whose performance you are investigating.
spec.targetRef.podUidUID of the selected pod. Supply it when several pods or containers are eligible, such as multiple Ballista executors.
spec.targetRef.uidUID of that resource. Copy it from the live target so the capture refers to that exact instance.

trigger​

Arm CUDA capture before launch. Select a training step window here to capture steps other than the default first eight.

FieldWhen to use it
spec.trigger.epochReserved epoch selector. Epoch-based triggers report Unsupported in this release. Use firstStep and stepCount for a supported window.
spec.trigger.firstStepFirst training step in the CUDA capture window. Choose a later step to skip warm-up.
spec.trigger.stageReserved stage selector. Stage-based triggers report Unsupported in this release. Use a step window for a CUDA capture.
spec.trigger.stepCountNumber of training steps to collect after the window starts. Choose a smaller count to limit the size and overhead of the trace.

workspaceUid​

UID of the enrolled namespace. Admission fixes this value so a recreated workspace cannot inherit the capture.

Kubernetes schema for spec

Required applies when the parent is present. A dash in the default column means the CRD declares no default.

FieldTypeRequiredDefaultSchema constraints and descriptions
specobjectyes—Select the workload to profile, the capture mode, and its duration. · maxProperties 1024
spec.durationSecondsintegerno30Upper time bound for this capture. Choose a shorter window for a brief CPU spike or a longer window for intermittent activity. · format "uint32" · maximum 120 · minimum 5
spec.modestringyes—Cpu samples a running process. Cuda profiles a training window and must be armed before the initial plan is frozen. · enum ["Cpu","Cuda"] · maxLength 16384
spec.sampleRateHzintegerno49CPU sampling frequency in samples per second. A higher rate can resolve shorter activity at the cost of more sampling work. · format "uint32" · maximum 99 · minimum 19
spec.targetRefobjectyes—Identifies the workload to profile. Include its current object UID so a replacement with the same name cannot become the target. · maxProperties 1024
spec.targetRef.attemptUidstringno—Identifies one execution attempt. Use it when a retry and an earlier attempt belong to the same target. · maxLength 128 · nullable true
spec.targetRef.containerNamestringno—Container within the selected pod. Use the name reported for the target process when a pod has multiple containers. · maxLength 253 · nullable true
spec.targetRef.kindstringyes—Selects the workload type that owns the process of interest, such as TrainingRun for a trainer or BallistaCluster for an executor. · enum ["SnapshotBuild","TrainingRun","PredictionRun","InferenceEndpoint","BallistaCluster","ConnectorService"] · maxLength 16384
spec.targetRef.namestringyes—Name of the target resource. Use the name of the workload whose performance you are investigating. · maxLength 253
spec.targetRef.podUidstringno—UID of the selected pod. Supply it when several pods or containers are eligible, such as multiple Ballista executors. · maxLength 128 · nullable true
spec.targetRef.uidstringyes—UID of that resource. Copy it from the live target so the capture refers to that exact instance. · maxLength 128
spec.triggerobjectno—Arm CUDA capture before launch. Select a training step window here to capture steps other than the default first eight. · maxProperties 1024 · nullable true
spec.trigger.epochintegerno—Reserved epoch selector. Epoch-based triggers report Unsupported in this release. Use firstStep and stepCount for a supported window. · format "uint32" · minimum 0 · nullable true
spec.trigger.firstStepintegerno—First training step in the CUDA capture window. Choose a later step to skip warm-up. · format "uint32" · maximum 1000000 · minimum 1 · nullable true
spec.trigger.stagestringno—Reserved stage selector. Stage-based triggers report Unsupported in this release. Use a step window for a CUDA capture. · maxLength 16384 · nullable true
spec.trigger.stepCountintegerno—Number of training steps to collect after the window starts. Choose a smaller count to limit the size and overhead of the trace. · format "uint32" · maximum 128 · minimum 1 · nullable true
spec.workspaceUidstringyes—UID of the enrolled namespace. Admission fixes this value so a recreated workspace cannot inherit the capture. · maxLength 128

The validation schema matches prokrust-crds 0.23.0-rc.1.