Skip to main content
Version: Dev 🚧

Odin API Reference

Odin serves models on Kubernetes through two custom resources in the odin.moreh.io/v1alpha1 API group: InferenceService (a running inference deployment) and InferenceServiceTemplate (a reusable spec fragment that an InferenceService can reference).

InferenceService​

An InferenceService describes a model deployment — the inference engine, the model, parallelism, and the pod templates that run it. The pod templates (template, workerTemplate) are standard Kubernetes PodTemplateSpec objects.

Spec

FieldTypeRequiredDescription
frameworkstringnoFramework specifies the inference engine (e.g. vllm, sglang).
inferencePoolRefsarraynoInferencePoolRefs is a list of references to InferencePools.
modelobjectnoModel identifies the model to serve.
parallelismobjectnoParallelism defines the parallelism parameters for distributed inference.
replicasintegernoNumber of replicas for Deployments or LeaderWorkerSets.
revisionHistoryLimitintegernoRevisionHistoryLimit is the number of old ReplicaSets to retain for this InferenceService's Deployment. Has no effect on LeaderWorkerSet-backed InferenceServices (WorkerTemplate set) — LWS has no equivalent field upstream.
rolloutStrategyobjectnoRolloutStrategy defines rollout settings for Deployment or LeaderWorkerSet.
runtimeBaseRefobjectnoRuntimeBaseRef references the cluster-scoped RuntimeBase applied as the lowest-priority layer of the merged InferenceService spec. Across an InferenceService and its templateRefs, runtimeBaseRef may be declared in at most one place.
serviceobjectnoService defines configuration for the Kubernetes Service associated with the InferenceService.
templateobjectnoTemplate describes the pod template for Deployment or LeaderWorkerSet leader.
templateRefsarraynoTemplateRefs is a list of references to InferenceServiceTemplates.
workerTemplateobjectnoWorkerTemplate describes the pod template for LeaderWorkerSet workers.

inferencePoolRefs​

FieldTypeRequiredDescription
namestringnoName of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

model​

FieldTypeRequiredDescription
namestringyesName is the model identifier (e.g. HuggingFace model ID).

parallelism​

FieldTypeRequiredDescription
dataintegernoData parallelism size.
dataLocalintegernoDataLocal data local parallelism size.
dataRPCPortintegernoDataRPCPort is the data parallelism RPC port.
expertbooleannoExpert enables expert parallelism.
pipelineintegernoPipeline parallelism size.
tensorintegernoTensor parallelism size.

rolloutStrategy​

FieldTypeRequiredDescription
rollingUpdateobjectnoRollingUpdate defines the parameters for RollingUpdate strategy.
typestringnoType defines the rollout strategy.

runtimeBaseRef​

FieldTypeRequiredDescription
namestringyesName is the name of the referent.

service​

FieldTypeRequiredDescription
targetstringnoTarget specifies which pods receive the InferenceService label for Service endpoint selection. For LeaderWorkerSet: leader (rank-0 only), workers (worker pods only), all, or auto. For Deployment: target is ignored; label is always applied.

templateRefs​

FieldTypeRequiredDescription
groupstringnoGroup is the group of the referent. When omitted, odin.moreh.io is assumed.
kindstringnoKind is the kind of the referent. When omitted, the reference resolves to the ClusterInferenceServiceTemplate with the given name if one exists, otherwise to an InferenceServiceTemplate.
namestringyesName is the name of the referent.

Status

FieldTypeRequiredDescription
conditionsarraynoConditions represent the latest available observations of an object's state.
hpaPodSelectorstringnoHPAPodSelector for pods that belong to the InferenceService object, this is needed for HPA to know what pods belong to the InferenceService object.
observedGenerationintegernoObservedGeneration reflects the InferenceService's metadata.generation that this status was reconciled against. Set at end of a successful reconcile only.
readyReplicasintegernoReadyReplicas track the number of groups that are in ready state (updated or not).
renderedSpecobjectnoRenderedSpec contains the fully resolved InferenceServiceSpec after merging templateRefs and applying template rendering. NOTE: Schemaless + PreserveUnknownFields prevent controller-gen from expanding the full InferenceServiceSpec schema inline, which would exceed CRD size limits. Go type safety is preserved at compile time; API-server-level validation is omitted.
replicasintegernoReplicas track the total number of groups that have been created (updated or not, ready or not)
updatedReplicasintegernoUpdatedReplicas track the number of groups that have been updated (ready or not).
workloadobjectnoWorkload describes the active child workload (Deployment or LeaderWorkerSet) and surfaces a single diagnostic signal explaining the current state when not Ready. Rebuilt from scratch every reconcile; not preserved across workload-kind swaps.

conditions​

FieldTypeRequiredDescription
lastTransitionTimestringyeslastTransitionTime 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.
messagestringyesmessage is a human readable message indicating details about the transition. This may be an empty string.
observedGenerationintegernoobservedGeneration 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.
reasonstringyesreason 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.
statusstringyesstatus of the condition, one of True, False, Unknown.
typestringyestype of condition in CamelCase or in foo.example.com/CamelCase.

workload​

FieldTypeRequiredDescription
conditionsarraynoConditions is a verbatim snapshot of the child's status.conditions at reconcile time. Consumers needing raw child state read this; consumers wanting a summary read InferenceService.status.conditions[Ready] + .workload.diagnostic.
diagnosticobjectnoDiagnostic is a single picked failure signal explaining why the workload is not Ready. Absent when Ready=True or when no qualifying signal exists.
kindstringyesKind is the kind of the active child workload.
namestringyesName is the name of the active child workload.
observedGenerationintegernoObservedGeneration is the child workload's status.observedGeneration. Absent when the child has not yet been created or has not reported a status.

InferenceServiceTemplate​

An InferenceServiceTemplate is a reusable fragment of InferenceService spec. An InferenceService references one or more templates through spec.templateRefs; the referenced templates are merged into its rendered spec.

Spec

FieldTypeRequiredDescription
frameworkstringnoFramework specifies the inference engine (e.g. vllm, sglang).
modelobjectnoModel identifies the model to serve.
parallelismobjectnoParallelism defines the parallelism parameters for distributed inference.
runtimeBaseRefobjectnoRuntimeBaseRef references the cluster-scoped RuntimeBase applied as the lowest-priority layer of the merged InferenceService spec. Across an InferenceService and its templateRefs, runtimeBaseRef may be declared in at most one place.
serviceobjectnoService defines configuration for the Kubernetes Service associated with the InferenceService.
templateobjectnoTemplate describes the pod template for Deployment or LeaderWorkerSet leader.
workerTemplateobjectnoWorkerTemplate describes the pod template for LeaderWorkerSet workers.

model​

FieldTypeRequiredDescription
namestringyesName is the model identifier (e.g. HuggingFace model ID).

parallelism​

FieldTypeRequiredDescription
dataintegernoData parallelism size.
dataLocalintegernoDataLocal data local parallelism size.
dataRPCPortintegernoDataRPCPort is the data parallelism RPC port.
expertbooleannoExpert enables expert parallelism.
pipelineintegernoPipeline parallelism size.
tensorintegernoTensor parallelism size.

runtimeBaseRef​

FieldTypeRequiredDescription
namestringyesName is the name of the referent.

service​

FieldTypeRequiredDescription
targetstringnoTarget specifies which pods receive the InferenceService label for Service endpoint selection. For LeaderWorkerSet: leader (rank-0 only), workers (worker pods only), all, or auto. For Deployment: target is ignored; label is always applied.