Naming and Label Conventions#
AIM Engine creates derived resources (AIMProfile, InferenceService, HTTPRoute, PVCs, Jobs, etc.) that do not share their parent’s name. This page documents the naming algorithm, the canonical labels you’ll see on AIM-managed resources, and how to query them.
Derived naming#
Algorithm#
Derived names are generated by GenerateDerivedName, which produces deterministic, RFC 1123-compliant names:
Sanitize each name part — lowercase, replace non-alphanumeric characters with
-, trim leading/trailing dashes.Hash — compute SHA-256 of the inputs (sorted deterministically), truncate to a configured hex length.
Assemble — join sanitized parts with
-, append-<hash>.Fit — if the result exceeds 63 characters, iteratively shorten the longest part until it fits.
Why derived names?#
Kubernetes names have a 63-character limit. AIM Engine often needs to encode multiple dimensions (model name, accelerator, precision, service name) into one name. The hash suffix guarantees uniqueness when parts are truncated.
Important
Derived resource names are not predictable from the parent name alone. Always use labels (not name matching) to find child resources.
v1alpha2 derived resource names#
Resource |
Created by |
Name parts |
Hash source |
|---|---|---|---|
|
|
|
model UID + derivation spec |
|
|
|
cluster model UID + derivation spec |
Derived |
|
|
source profile + overrides |
Overlay |
|
|
service UID + overrides |
|
|
|
namespace |
|
|
|
source URI + env + storage |
Discovery |
|
|
model + spec hash |
Discovery |
|
|
spec hash |
|
|
|
namespace |
|
|
|
namespace |
PVC |
|
|
artifact UID |
Download |
|
|
artifact UID |
v1alpha1 derived resource names#
These are still produced for v1alpha1 resources during the deprecation window.
Resource |
Created by |
Name parts |
Hash source |
|---|---|---|---|
|
|
|
hash string |
|
|
|
namespace |
|
|
|
service UID |
|
|
|
image URI |
|
|
|
registry + repo + tag |
Labels#
All AIM labels use the aim.eai.amd.com/ prefix.
v1alpha2 profile provenance labels#
The canonical label set stamped on every operator-produced AIMProfile / AIMClusterProfile. These are the labels selectors (both AIMProfileSet and AIMService) key off.
Label |
Values |
Set by |
Used by |
|---|---|---|---|
|
|
Model controller, AIMProfileSet controller |
AIMProfileSet |
|
|
Model / AIMProfileSet controllers; backfilled by AIMProfile controller for user-authored |
AIMProfileSet |
|
Name of producing AIM(Cluster)Model |
Model / AIMProfileSet controllers (with controller ownerRef) |
AIMProfileSet |
|
|
Model / AIMProfileSet controllers |
AIMProfileSet |
v1alpha2 profile annotations#
These carry provenance or controller compatibility state that nothing selects on, so they are annotations, not labels — a label selector will never match them.
Annotation |
Values |
Set by |
Used by |
|---|---|---|---|
|
|
AIMModel discovery/generation or AIMProfileSet derivation |
Origin classification ( |
|
|
Image discovery (default); manual opt-in for hand-authored profiles |
AIMProfileSet candidate eligibility |
|
RuntimeConfig fallback name |
AIMModel generation |
Retaining a generated profile when its hardware disappears |
|
JSON object with |
Image discovery; inherited by AIMProfileSet derivation and AIMService overlays |
Rendering the source-compatible profile YAML mounted into the runtime |
profile-yaml-contract is controller-owned diagnostic state. Typical values identify the aim-profile/v1 codec and list the metadata fields present in the source. The optional extensions object retains source-owned fields that AIM Engine does not model, for example metadata.capabilities. Profiles without source YAML provenance use the strict canonical accelerator v1 format. Discovered and derived profiles require the annotation; projection waits for their producer to backfill it instead of guessing. Unknown fields in the contract envelope, unknown codec identifiers, malformed contracts, and contracts larger than 64 KiB are rejected explicitly during derivation or runtime projection.
Hand-authored profiles
The source-model and source-model-scope labels are derived from controller ownerReferences (or propagated labels for AIMProfileSet-owned profiles). The operator strips them every reconcile from any profile without an AIM controller owner. Hand-authored profiles that need to be reachable by modelRef.name must be onboarded through an AIMModel/AIMProfileSet — they cannot fake provenance with manually-applied labels. See Profiles.
Ownership and identity#
Label |
Value |
Purpose |
|---|---|---|
|
Service name |
Framework-applied owner label ( |
|
Model name |
Identifies the owning model |
|
Template name |
Identifies the owning template (v1alpha1) |
|
Cache name |
Identifies the owning template cache (v1alpha1) |
|
|
How the resource was created |
|
|
Marks operator-managed resources |
|
|
Functional role of the resource |
Runtime attributes#
Label |
Value |
Purpose |
|---|---|---|
|
|
Optimization metric |
|
|
Numeric precision |
|
|
GPU model |
|
|
GPU count |
Projected KServe ServingRuntime / ClusterServingRuntime metadata#
Stamped on every projected KServe ServingRuntime / ClusterServingRuntime (and its colocated profile ConfigMap) so a native / bring-your-own-KServe consumer can trace and inspect the runtime without reversing its hashed object name. See Bring Your Own KServe.
Per-profile KServe ServingRuntime / ClusterServingRuntime objects are named aim-<truncated-profile>-<hash> (hashed, not reversible); the Reduced/Both model-slug primary is named aim-<model-slug> (readable, autoSelect off). The aim- prefix is reserved for AIM Engine — do not hand-author objects under it.
Label |
Value |
Purpose |
|---|---|---|
|
Sanitized backing profile name |
Correlator back to the profile (selectable) |
|
Sanitized model slug |
Filter |
|
|
Filter by numeric precision |
|
|
Filter by accelerator class |
|
|
How it was materialized — |
|
|
Projection provenance surfaced on the |
Annotation |
Value |
Purpose |
|---|---|---|
|
Untruncated backing profile name |
Recover the identity the hashed object name hides |
|
Backing profile |
Model architecture identifier |
|
Backing profile |
Served model id |
|
Backing profile precision |
— |
|
Backing profile metric |
— |
|
Human-readable note |
Companion to |
|
SHA-256 digest |
Stamped identically on a complete namespaced |
A projected ServingRuntime / ClusterServingRuntime also carries an owner reference to its backing AIMProfile / AIMClusterProfile, which is what garbage-collects it when the profile is deleted.
Cache labels#
Label |
Value |
Purpose |
|---|---|---|
|
|
PVC cache type |
|
|
Cache resource type |
|
Artifact name |
Identifies the cache resource |
|
|
Model download source |
v1alpha1 template labels#
These remain in use on v1alpha1 templates and v1alpha1-managed downstream resources during the deprecation window.
Label |
Value |
Purpose |
|---|---|---|
|
Template name |
On artifacts — parent template |
|
|
Template scope (note capitalisation differs from the v1alpha2 |
|
|
Profile index in template |
|
|
Template metric |
|
|
Template precision |
|
User alias |
Custom template alias |
|
|
Marks custom model templates |
Accelerator detection labels#
Labels written by the AcceleratorDetector DaemonSet via NFD. These use the value-in-key pattern — each hardware identifier is a separate label key, matched with the Exists operator. The label value carries the accelerator count.
Label pattern |
Example key |
Example value |
Purpose |
|---|---|---|---|
|
|
|
Specific GPU or CPU model |
|
|
|
Accelerator family ( |
|
|
|
Accelerator vendor, keyed per family so cross-vendor nodes don’t conflict |
|
|
|
GPU partition state — the |
Both axes use the value-in-key pattern; the value (accelerator/partition count) is informational only and the matcher keys off the label key. See Accelerator Detection for details on label production.
Standard Kubernetes labels#
Label |
Value |
Purpose |
|---|---|---|
|
|
Controller that owns the child resource |
|
|
Functional component |
|
|
Application name |
Controller labels#
The reconciler adds aim.eai.amd.com/{controller}.name = <parent-name> to all managed children. For example, a resource managed by the AIMService controller gets:
aim.eai.amd.com/service.name: qwen-chat
Querying AIM resources#
Find profiles owned by a specific model#
# Namespace-scoped
kubectl get aimprofile -l aim.eai.amd.com/source-model=qwen-qwen3-32b -n ml-team
# Cluster-scoped
kubectl get aimclusterprofile -l aim.eai.amd.com/source-model=qwen-qwen3-32b
Find all base profiles#
kubectl get aimprofile -A -l aim.eai.amd.com/profile-role=base
Find all resources for a service#
kubectl get all -l aim.eai.amd.com/service.name=qwen-chat -n <namespace>
Find the InferenceService for a service#
kubectl get inferenceservice -l aim.eai.amd.com/service.name=qwen-chat -n <namespace>
Find artifacts for a profile cache#
kubectl get aimartifact -l aim.eai.amd.com/profile-cache.name=<cache-name> -n <namespace>
Find projected KServe ClusterServingRuntime objects for a model#
kubectl get clusterservingruntime \
-l aim.eai.amd.com/model=qwen-qwen3-32b \
-L aim.eai.amd.com/runtime-projection-state,aim.eai.amd.com/runtime-projection
Find discovery jobs for a model#
kubectl get jobs -l aim.eai.amd.com/model=<model-name> -n <namespace>
Find all auto-generated resources#
kubectl get aimmodel -l aim.eai.amd.com/origin=auto-generated --all-namespaces
Field indexers#
The operator maintains field indexes for efficient lookups. The full set used by v1alpha2 controllers:
Index key |
Resource |
Description |
|---|---|---|
|
|
Models by image URI |
|
|
Resources by selector aimId |
|
|
Resources by selected source model |
|
|
Profile sets by source discovery cache |
|
|
Profiles by aimId |
|
|
Caches by target profile name |
|
|
Artifacts by source URI |
|
Multiple CRDs |
Resources by runtime config |
v1alpha1-only indexers (still active during deprecation):
Index key |
Resource |
Description |
|---|---|---|
|
|
Services by template reference |
|
|
Services by resolved template |
|
|
Caches by template name |
|
|
Caches by template scope |
|
|
Templates by model name |
Some index key names are legacy internal identifiers (for example, .spec.templateRef) and may not exactly match the current CRD JSON field path.