Naming and Label Conventions#
AIM Engine creates derived resources (InferenceServices, HTTPRoutes, PVCs, Jobs, etc.) that do not share their parent’s name. This page documents the naming algorithm, all label keys, and how to query AIM-managed resources.
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 dashesHash — compute SHA-256 of 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 (template name, service name, GPU model, precision) into a single name. The hash suffix guarantees uniqueness when names are truncated.
!!! important Derived resource names are not predictable from the parent name alone. Always use labels (not name matching) to find child resources.
Derived Resource Names#
Resource |
Created By |
Name Parts |
Hash Source |
|---|---|---|---|
InferenceService |
AIMService |
|
namespace |
HTTPRoute |
AIMService |
|
namespace |
AIMTemplateCache (shared) |
AIMService |
|
namespace |
AIMTemplateCache (dedicated) |
AIMService |
|
service UID |
AIMModel (from image) |
AIMService |
|
image URI |
AIMClusterModel |
AIMClusterModelSource |
|
registry + repo + tag |
AIMServiceTemplate (discovered) |
AIMModel |
|
hash string |
AIMArtifact |
AIMTemplateCache |
|
source URI + env + storage |
PVC |
AIMArtifact |
|
artifact UID |
Download Job |
AIMArtifact |
|
artifact UID |
Check-size Job |
AIMArtifact |
|
artifact UID |
Labels#
AIM Domain Labels#
All AIM labels use the aim.eai.amd.com/ prefix.
Ownership and Identity#
Label |
Value |
Purpose |
|---|---|---|
|
Service name |
Framework-applied owner label ( |
|
Model name |
Identifies the owning model |
|
Template name |
Identifies the owning template |
|
Cache name |
Identifies the owning template cache |
|
|
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 |
Cache Labels#
Label |
Value |
Purpose |
|---|---|---|
|
|
PVC cache type |
|
|
Cache resource type |
|
Artifact name |
Identifies the cache resource |
|
|
Model download source |
Template Labels#
Label |
Value |
Purpose |
|---|---|---|
|
Template name |
On artifacts — parent template |
|
|
Template scope |
|
|
Profile index in template |
|
|
Template metric |
|
|
Template precision |
|
User alias |
Custom template alias |
|
|
Marks custom model templates |
|
Model identifier |
Source model reference |
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 resource 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 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 Template Cache#
kubectl get aimartifact -l aim.eai.amd.com/template-cache.name=<cache-name> -n <namespace>
Find Discovery Jobs for a Template#
kubectl get jobs -l aim.eai.amd.com/template=<template-name> -n <namespace>
Find Download Jobs for an Artifact#
kubectl get jobs -l aim.eai.amd.com/cache.name=<artifact-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:
Index Field |
Resource |
Description |
|---|---|---|
|
AIMService |
Services by template reference |
|
AIMService |
Services by resolved template |
|
AIMTemplateCache |
Caches by template name |
|
AIMTemplateCache |
Caches by template scope |
|
AIMServiceTemplate |
Templates by model name |
|
AIMModel / AIMClusterModel |
Models by image URI |
|
Multiple CRDs |
Resources by runtime config |
|
AIMArtifact |
Artifacts by source URI |