/api/configs/group_template#
Each group template is defined by a name and a Kubernetes manifest dictionary (Dict[String, Any]). Group templates are applied to workflow task groups and create supporting Kubernetes resources before group pods are scheduled.
Default Value: Empty dictionary {} (no group templates configured by default)
Required Fields#
Each group template manifest must include the following fields:
Field |
Type |
Description |
|---|---|---|
|
String |
The Kubernetes API version for the resource (for example, |
|
String |
The Kubernetes resource kind (for example, |
|
String |
The resource name. Supports variable substitution (for example, |
Note
metadata.namespace must not be set. OSMO assigns the namespace at runtime based on the backend configuration.
Example#
The following example defines two group templates: a ComputeDomain for NvLINK connectivity and a ConfigMap for shared workflow configuration:
{
"compute-domain": {
"apiVersion": "resource.nvidia.com/v1beta1",
"kind": "ComputeDomain",
"metadata": {
"name": "compute-domain-{{WF_GROUP_UUID}}"
},
"spec": {
"numNodes": 0,
"channel": {
"resourceClaimTemplate": {
"name": "compute-domain-{{WF_GROUP_UUID}}-rct"
}
}
}
},
"workflow-config": {
"apiVersion": "v1",
"kind": "ConfigMap",
"metadata": {
"name": "workflow-config-{{WF_GROUP_UUID}}"
},
"data": {
"workflow_id": "{{WF_ID}}",
"pool": "{{WF_POOL}}"
}
}
}
The key (for example, compute-domain) is the template name referenced in the pool’s common_group_templates list. The value is the full Kubernetes manifest for the resource.
A pool applies group templates by listing their names in the common_group_templates array:
{
"my-pool": {
"backend": "default",
"common_group_templates": ["compute-domain", "workflow-config"]
}
}
To learn more about group templates, see Group Template Concepts.