target-snapshot schema
target/snapshot-pre.json and target/snapshot-post.json: the target workload and each upstream, read-only, before and after the load. The two files share this schema and differ in phase.
Schema file: schema/json/bundle/target-snapshot.schema.json. Generated from servtuner commit 5b46cdad0e5c.
Top level
Section titled “Top level”| Field | Type | Required | Description |
|---|---|---|---|
phase |
snapshotPhase | Yes | |
captured_at |
utcTimestamp | Yes | |
workloads |
array of workload | Yes | at least 1 item |
Definitions
Section titled “Definitions”snapshotPhase
Section titled “snapshotPhase”Type: "pre", "post"
workloadRole
Section titled “workloadRole”Type: "target", "upstream"
resourceQuantities
Section titled “resourceQuantities”Kubernetes resource quantities by resource name, for example cpu, memory, nvidia.com/gpu.
Type: map of string
envVar
Section titled “envVar”An environment variable. A redacted one carries no value: a run never stores a secret.
Type: object or object
container
Section titled “container”| Field | Type | Required | Description |
|---|---|---|---|
name |
string |
Yes | |
image |
string |
Yes | |
image_digest |
string |
No | The resolved digest, from the pod’s container status. pattern ^sha256:[0-9a-f]{64}$ |
args |
array of string |
No | |
env |
array of envVar | No | |
requests |
resourceQuantities | No | |
limits |
resourceQuantities | No | |
restart_count |
integer |
No | ≥ 0 |
last_termination_reason |
string |
No | For example OOMKilled. |
| Field | Type | Required | Description |
|---|---|---|---|
name |
string |
Yes | |
node |
string |
No | |
containers |
array of container | Yes | at least 1 item |
replicas
Section titled “replicas”| Field | Type | Required | Description |
|---|---|---|---|
desired |
integer |
Yes | ≥ 0 |
ready |
integer |
Yes | ≥ 0 |
Labels of a node the workload runs on (instance type, GPU model).
| Field | Type | Required | Description |
|---|---|---|---|
name |
string |
Yes | |
labels |
map of string |
Yes |
hpaMetric
Section titled “hpaMetric”| Field | Type | Required | Description |
|---|---|---|---|
type |
string |
Yes | |
name |
string |
Yes | |
target |
string |
Yes | Target value as Kubernetes prints it. |
HorizontalPodAutoscaler of the workload. min_replicas <= max_replicas is not expressible here and is a servtuner validate rule.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string |
Yes | |
min_replicas |
integer |
Yes | ≥ 0 |
max_replicas |
integer |
Yes | ≥ 0 |
current_replicas |
integer |
Yes | ≥ 0 |
metrics |
array of hpaMetric | No |
targetInfo
Section titled “targetInfo”What the workload reports about itself.
| Field | Type | Required | Description |
|---|---|---|---|
version |
string |
No | As the workload reports it, for example vLLM /version. |
models |
array of string |
No | Model ids from /v1/models. |
cache_config |
map of string |
No | vLLM cache_config_info labels. |
hardwareProfile
Section titled “hardwareProfile”Hardware the results are scoped to. Requires the accelerator (or none) and the node instance type or the CPU model; fields that cannot be read are omitted.
| Field | Type | Required | Description |
|---|---|---|---|
hardware_profile_id |
string |
No | Hash of the other fields. |
accelerator |
string |
Yes | GPU model, or none when the workload has no accelerator. |
gpu_count_per_pod |
integer |
No | ≥ 0 |
gpu_memory_bytes |
integer |
No | ≥ 0 |
gpu_interconnect |
"nvlink", "pcie" |
No | |
driver_version |
string |
No | |
cuda_version |
string |
No | |
node_instance_type |
string |
No | The cloud instance type, or local. |
cpu_model |
string |
No | |
cpu_cores |
integer |
No | ≥ 0 |
Exactly which fields are allowed together is restricted further by the schema.
workload
Section titled “workload”| Field | Type | Required | Description |
|---|---|---|---|
role |
workloadRole | Yes | |
upstream_index |
integer |
No | Position in the RunSpec’s target.upstreams; present only when role is upstream. ≥ 0 |
target_type |
targetType | Yes | |
pods |
array of pod | Yes | |
replicas |
replicas | No | |
nodes |
array of node | No | |
hpa |
hpa | No | |
target_info |
targetInfo | No | |
hardware_profile |
hardwareProfile | No |