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 |
|
|
AIMProfileSet derivation |
Provenance only |
|
|
Image discovery (default); manual opt-in for hand-authored profiles |
AIMProfileSet candidate eligibility |
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 |
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 |
|
|
|
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 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.