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 reason | What to check |
|---|---|
Armed, Capturing, Finalizing | The 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. |
Ready | The capture completed. Use status.artifact for the stored profile. A successful CPU export also supplies status.flamegraph. |
Partial | Inspect 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. |
Unsupported | For 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. |
Failed | Inspect the reason. CollectorJobDisappeared means the collector Job was lost. For CaptureExportFailed, inspect the collector result and artifact storage access. |
Cancelled | The 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
| Field | What it tells you |
|---|---|
status.artifact | Reference to the captured profiling data. Use it to retrieve the output for this target and capture interval. |
status.cleanupComplete | Reports whether cleanup has finished. A terminal outcome can be visible before all resources have been released. |
status.finishedAt | Time the controller recorded the terminal outcome. Use it with the start time to determine elapsed execution time. |
status.flamegraph | Reference to the published flame graph when available. Open the artifact to inspect where the profiled workload spent time. |
status.identity | Identifies the capture target selected by the controller. Compare it with the intended workload when reviewing a capture. |
status.jobRef | Reference to the capture job. Inspect it to diagnose a capture that did not finish. |
status.message | Controller details for the reported reason. Inspect the message to identify the target or operation that needs attention. |
status.phase | Current stage reported by the controller. Use the conditions or failure details to diagnose why progress stopped. |
status.reason | Machine-readable reason for the current capture state. Inspect the message for details about that reason. |
status.startedAt | Time 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.
| Field | Type | Required | Default | Schema constraints and descriptions |
|---|---|---|---|---|
status | object | no | — | maxProperties 1024 · nullable true |
status.artifact | object | no | — | 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.digest | string | yes | — | 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.mediaType | string | yes | — | Use the recorded media type to identify the artifact representation. · maxLength 2048 |
status.artifact.sizeBytes | integer | yes | — | Use the published byte count when verifying a transferred artifact. · format "int64" |
status.artifact.uri | string | yes | — | Use this location to identify the published artifact during retrieval or diagnostics. · maxLength 2048 |
status.cleanupComplete | boolean | no | false | Reports whether cleanup has finished. A terminal outcome can be visible before all resources have been released. |
status.finishedAt | string | no | — | Time the controller recorded the terminal outcome. Use it with the start time to determine elapsed execution time. · maxLength 2048 · nullable true |
status.flamegraph | object | no | — | 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.digest | string | yes | — | 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.mediaType | string | yes | — | Use the recorded media type to identify the artifact representation. · maxLength 2048 |
status.flamegraph.sizeBytes | integer | yes | — | Use the published byte count when verifying a transferred artifact. · format "int64" |
status.flamegraph.uri | string | yes | — | Use this location to identify the published artifact during retrieval or diagnostics. · maxLength 2048 |
status.identity | object | no | — | Identifies the capture target selected by the controller. Compare it with the intended workload when reviewing a capture. · maxProperties 1024 · nullable true |
status.identity.attemptUid | string | no | — | maxLength 128 · nullable true |
status.identity.containerId | string | yes | — | maxLength 2048 |
status.identity.containerName | string | yes | — | maxLength 253 |
status.identity.imageId | string | yes | — | maxLength 2048 |
status.identity.namespaceUid | string | yes | — | maxLength 128 |
status.identity.nodeName | string | yes | — | maxLength 253 |
status.identity.podName | string | yes | — | maxLength 253 |
status.identity.podUid | string | yes | — | maxLength 128 |
status.identity.targetUid | string | yes | — | maxLength 128 |
status.jobRef | object | no | — | Reference to the capture job. Inspect it to diagnose a capture that did not finish. · maxProperties 1024 · nullable true |
status.jobRef.apiVersion | string | yes | — | maxLength 2048 |
status.jobRef.executionDigest | string | no | — | maxLength 71 · nullable true · pattern "^sha256:[0-9a-f]{64}$" |
status.jobRef.kind | string | yes | — | maxLength 2048 |
status.jobRef.name | string | yes | — | maxLength 253 |
status.jobRef.recoveryOrdinal | integer | no | — | format "int32" · nullable true |
status.jobRef.uid | string | yes | — | maxLength 128 |
status.message | string | no | — | Controller details for the reported reason. Inspect the message to identify the target or operation that needs attention. · maxLength 1024 · nullable true |
status.phase | string | no | "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.reason | string | no | — | Machine-readable reason for the current capture state. Inspect the message for details about that reason. · maxLength 128 · nullable true |
status.startedAt | string | no | — | 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.
| Field | When to use it |
|---|---|
spec.targetRef.attemptUid | Identifies one execution attempt. Use it when a retry and an earlier attempt belong to the same target. |
spec.targetRef.containerName | Container within the selected pod. Use the name reported for the target process when a pod has multiple containers. |
spec.targetRef.kind | Selects the workload type that owns the process of interest, such as TrainingRun for a trainer or BallistaCluster for an executor. |
spec.targetRef.name | Name of the target resource. Use the name of the workload whose performance you are investigating. |
spec.targetRef.podUid | UID of the selected pod. Supply it when several pods or containers are eligible, such as multiple Ballista executors. |
spec.targetRef.uid | UID 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.
| Field | When to use it |
|---|---|
spec.trigger.epoch | Reserved epoch selector. Epoch-based triggers report Unsupported in this release. Use firstStep and stepCount for a supported window. |
spec.trigger.firstStep | First training step in the CUDA capture window. Choose a later step to skip warm-up. |
spec.trigger.stage | Reserved stage selector. Stage-based triggers report Unsupported in this release. Use a step window for a CUDA capture. |
spec.trigger.stepCount | Number 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.
| Field | Type | Required | Default | Schema constraints and descriptions |
|---|---|---|---|---|
spec | object | yes | — | Select the workload to profile, the capture mode, and its duration. · maxProperties 1024 |
spec.durationSeconds | integer | no | 30 | Upper 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.mode | string | yes | — | 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.sampleRateHz | integer | no | 49 | CPU 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.targetRef | object | yes | — | 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.attemptUid | string | no | — | Identifies one execution attempt. Use it when a retry and an earlier attempt belong to the same target. · maxLength 128 · nullable true |
spec.targetRef.containerName | string | no | — | 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.kind | string | yes | — | 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.name | string | yes | — | Name of the target resource. Use the name of the workload whose performance you are investigating. · maxLength 253 |
spec.targetRef.podUid | string | no | — | 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.uid | string | yes | — | UID of that resource. Copy it from the live target so the capture refers to that exact instance. · maxLength 128 |
spec.trigger | object | no | — | 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.epoch | integer | no | — | 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.firstStep | integer | no | — | 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.stage | string | no | — | 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.stepCount | integer | no | — | 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.workspaceUid | string | yes | — | 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.