AIMService (v1alpha1)#
Deprecated
The v1alpha1 AIMService shape (spec.template, spec.overrides) is deprecated. New deployments should use v1alpha2 AIMService, which references profiles instead of templates. See Migrating to v1alpha2 for conversion recipes.
This page documents the legacy template-based AIMService shape. The v1alpha2 service shape (spec.profile) coexists in the same CRD — see Services for the current model.
v1alpha1 lifecycle#
The controller resolves a model and a template, optionally creates a template cache, and produces a KServe InferenceService.
Spec fields (v1alpha1 path)#
Field |
Description |
|---|---|
|
References an |
|
References a container image directly; auto-creates a model if needed. |
|
Pin a specific |
|
Auto-select a template by |
|
Override template runtime parameters (engineArgs, env, …). |
|
|
|
Fixed or KEDA-autoscaled replicas. |
|
Reference an |
Resolution#
v1alpha1 resolution proceeds in two steps:
Model resolution —
spec.model.namelooks up namespace-then-cluster, orspec.model.imageauto-creates a model. Recorded instatus.resolvedModel.Template resolution —
spec.template.namelooks up the specific template;spec.template.selectionCriteriaevaluates a scoring algorithm against discovered templates. Recorded instatus.resolvedTemplate.
The v1alpha2 resolution model collapses these into a single profile resolution — see Services.
Selection algorithm (template path)#
When spec.template.selectionCriteria is set, the controller filters and scores discovered templates:
Filter by precision, accelerator type/model/count, metric, engine.
Filter by GPU availability on cluster nodes.
Score by
primary > type (optimized > general > preview > unoptimized) > version.Tie-break by template name (alphabetical) for determinism.
The same algorithm runs in v1alpha2 but operates on profiles instead of templates.
Conditions (v1alpha1 path)#
When an AIMService uses spec.template, the controller emits these conditions:
Condition |
Status |
Reason |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
See Legacy Conditions Reference for the full catalog.
Coexistence with v1alpha2#
A single AIMService cannot mix spec.template and spec.profile — admission rejects the combination. The CRD validation reads:
spec.profile and spec.template are mutually exclusive
one of spec.model or spec.profile must be specified
This means a migration from v1alpha1 to v1alpha2 on a given service is an atomic flip — remove spec.template, add spec.profile, apply.
Migration#
See Migrating to v1alpha2 — AIMService for field-by-field conversion examples.
The shortest path: replace spec.template.selectionCriteria with spec.profile.selector (same field names, different parent path). Replace spec.template.name with spec.profile.name. The names produced by v1alpha2 discovery match the v1alpha1 template profile names in most cases.