Repository navigation
function-aicr 0.3.0 embeds AICR v1.3.0 and redesigns the Input: one overlay object on the composite resource replaces the per-field ...From paths. It's a breaking release from 0.2.0. Every Composition that reads values from the composite resource changes, and a new stack can be refused where 0.2.0 deployed it. A stack that's already deployed keeps running.
Before you upgrade
Move the values a Composition reads from the composite resource under one object, and point overlayFrom.fieldPath at it. criteriaFrom and providerConfigRefFrom are removed, and a Composition that still sets one gets a fatal result:
criteriaFrom was removed: read values from the composite resource with overlayFrom.fieldPath
The object takes any field of the Input except overlayFrom. Declare it in the composite resource definition, because Crossplane prunes what the definition doesn't list. A path that's absent from the composite resource leaves the Composition's Input unchanged (Values from the composite resource, #25).
# Composition
input:
apiVersion: aicr.fn.crossplane.io/v1beta1
kind: Input
overlayFrom:
fieldPath: spec.aicr
# composite resource
spec:
aicr:
criteria:
accelerator: h100
service: eks
intent: training
providerConfigRef:
name: workload-clusterRemove any field the Input doesn't have. 0.2.0 ignored one, and 0.3.0 makes it fatal, in the Composition and in the overlay.
Check which new stacks are refused. The function now refuses what AICR's bundler refuses, for a component that isn't deployed yet. That affects the six Slurm recipes for AKS, EKS and GKE, which need a node selector, and the five recipes for which AICR's bundle checks fail without nodeScheduling: the four AKS recipes and the OKE gb300 recipe. Set nodeScheduling for them. A component that's already deployed isn't refused: it gets a Warning ending in is already deployed, so it is not refused.
Expect Warnings while the catalog moves. The function applies every chart move and looks it up in AICR's upgrade records, and anything not rated safe raises a Warning. These are the moves of the EKS h100 training recipe:
| Component | Move | AICR's verdict |
|---|---|---|
gpu-operator |
v26.3.3 to v26.7.2 | blocked: no record starts from v26.3.3 |
nvidia-dra-driver-gpu |
0.4.1 to 0.5.1 | blocked: no record starts from 0.4.1 |
nvsentinel |
v1.20.0 to v1.31.0 | blocked: no record starts from v1.20.0 |
kai-scheduler |
v0.14.1 to v0.16.9 | unknown |
kube-prometheus-stack |
84.4.0 to 84.5.0 | manual |
nfd |
0.19.0 to 0.20.1 | manual |
nodewright-operator |
v0.17.1 to v0.21.0 | manual |
The function holds none of them back, so read the Warnings against AICR's explanations (Upgrades). #47 has the design for an approval that delays such a move until an approver accepts it.
Check what else the catalog changed:
nodewright-operatormoves its default namespace fromskyhooktonodewright, and its tuning resource fromSkyhooktoNodeWright. The function keeps a deployedReleasein its namespace: on an existing cluster the operator stays inskyhook. SetcomponentOverrides.nodewright-operator.namespaceto move it. TheObjectfor the tuning resource gets a new name, so the old one is deleted and the new one created.- The stock recipes use NKTP where they used the full
kube-prometheus-stack. cert-managerenables itsServiceMonitorand depends onprometheus-operator-crds. If you skip that component, the CRDs have to come from elsewhere.- A recipe source artifact written for an AICR older than v1.0.0 is refused at startup.
- The
h100/gke/cos/training/kubeflowrecipe requiresconfiguration.gke.tcpxoInterfaces, and is fatal without it.
Check status readers. componentCount in the resolved-recipe summary is now the number of components the recipe deploys. On 0.2.0 it was the length of deployedComponents.
For Composition authors
Recipe variants and configuration
profile selects one variant of a recipe, such as {gpuStack: dra}. configuration.gke.tcpxoInterfaces maps the guest interfaces eth1 to eth8 to GKE Network objects, and configuration.runtimeInventory.mode (enabled or disabled) adds or removes k8s-aibom. Each is passed to AICR only when set, and AICR validates the values (Recipe variants and configuration, #25).
componentClasses filters by AICR class
componentClasses: [core] deploys only the components AICR's registry classes as core, what a plain GPU pod needs to run. ops is everything else. Unset, every class is deployed, and an unknown class is fatal. A dependency in a class that's left out counts as satisfied for ordering (#25).
A fuller status summary
With target.fieldPath set, the summary also reports profile, appliedOverlays and pendingComponents, each pending entry with the waitingFor blocker. Each entry of deployedComponents lists its chart version and namespace (The status summary, #25).
For operators
nodeScheduling places components on node pools
nodeScheduling.system and nodeScheduling.accelerated each take a nodeSelector and tolerations. The function writes them into every component's values at the paths AICR's registry lists, by the rules of AICR's bundler. A componentOverrides value wins. Unlike AICR's command line, which tolerates every taint when its flags are unset, the function doesn't default it, since that would reschedule every running stack on an upgrade (Node scheduling, #32).
AICR's bundle checks run
AICR's registry declares checks that its bundler runs before it writes a bundle. They guard combinations that install cleanly and still break a cluster: a keyless toleration on AKS deadlocks NodeWright's first installation. The function runs them with AICR's own code on every request. A blocking finding is fatal for a component that isn't deployed yet and a Warning for one that is. An upgrade of the function or the catalog never freezes a running stack (AICR's bundle checks, #37).
A deployed Release keeps its namespace
A Helm release can't move between namespaces. When a new recipe places a deployed component elsewhere, the function keeps the namespace the observed Release has and raises a Warning that quotes both. A manifest-only component follows a dependency whose namespace was kept, which keeps a custom resource next to its operator. An explicit componentOverrides.<component>.namespace moves a component (#25).
Upgrade warnings
A chart version change on a deployed Release is looked up in AICR's upgrade records. Anything but safe raises a Warning that quotes AICR's explanation and the summary of each record the move crosses. The move is applied anyway (Upgrades, #25).
draEviction wires AICR's eviction contract
draEviction: true makes the GPU Operator evict the DRA kubelet plugin before it replaces a driver in place, by wiring gpu-operator, nvidia-dra-driver-gpu and dra-node-labeler as AICR's bundler does. A recipe without all three gets a Warning and no wiring (DRA eviction, #25).
Opt in to a mixin
A mixin applies only when a catalog overlay lists it, so the recipe source is how a function deployment opts in. The manual shows the two-file artifact and how to publish it (Opt in to a mixin, #25).
The manual is a documentation site
The documentation is an mdBook site at https://jonasz-lasut.github.io/function-aicr/, and the README is its landing page (#27).
Fixes
A pre-manifest Object no longer waits for a namespace that doesn't exist
An Object for a pre-manifest file is created before its component's Release, which is what creates the namespace. provider-kubernetes failed with namespaces "..." not found, the Object never became ready, and the Release that waits for it was never emitted. In the stock catalog that withheld gpu-operator in twelve recipes. A component that renders pre-manifest documents now also gets an Object for its namespace, <component>-pre-namespace-<namespace>, with managementPolicies: [Observe, Create]: the provider creates a missing namespace and never updates or deletes one (#30).
An OCI chart whose repository ends in its name
The function trimmed the chart's name from the end of an OCI source, and provider-helm joins the two, so the reference was one segment short. kai-scheduler, at oci://ghcr.io/kai-scheduler/kai-scheduler/kai-scheduler, was denied by the registry and never synced, and everything that depends on it stayed withheld (#33).
The Object schema is required only when something is rendered
78 of the 81 recipes in the AICR v1.3.0 catalog include dra-node-labeler, whose manifest renders nothing unless enabled is true. The function required the Object schema anyway and was fatal wherever provider-kubernetes isn't installed. It now requires the schema for a kind only when it composes one, and a manifest that fails to render is reported on the first pass (#23).
Dependency updates
google.golang.org/grpc v1.83.2, golang.org/x/crypto v0.59.0, golang.org/x/net v0.62.0 and go.opentelemetry.io/otel/trace v1.47.0 include security fixes. The module builds with Go 1.27.4.
AICR version
Embeds aicr.run v1.3.0 (0.2.0: github.com/NVIDIA/aicr v0.20.0). The pinned version is the recipe catalog version, so recipeVersion in the summary reads v1.3.0.
Merged pull requests
- chore(deps): update gcr.io/distroless/static-debian13:nonroot docker digest to 1c2c046 by @renovate[bot] in #5
- chore(deps): update crossplane to v2.4.0 by @renovate[bot] in #6
- chore(deps): update dependency crossplane/cli to v2.5.0 by @renovate[bot] in #7
- chore(deps): update github-actions - autoclosed by @renovate[bot] in #8
- chore(deps): update dependency golangci/golangci-lint to v2.15.0 by @renovate[bot] in #9
- chore(deps): update go module directive to v1.27.4 by @renovate[bot] in #11
- chore(deps): update module google.golang.org/grpc to v1.83.2 [security] by @renovate[bot] in #14
- chore(deps): update crossplane to v2.4.3 by @renovate[bot] in #13
- chore(deps): update xpkg.crossplane.io/crossplane-contrib/function-auto-ready docker tag to v0.7.3 by @renovate[bot] in #17
- chore(deps): update github-actions by @renovate[bot] in #10
- chore(deps): update gcr.io/distroless/static-debian13:nonroot docker digest to aafe993 by @renovate[bot] in #12
- chore(deps): update dependency ubuntu to v26 by @renovate[bot] in #18
- chore(deps): update module go.opentelemetry.io/otel/trace to v1.47.0 [security] by @renovate[bot] in #21
- chore(deps): update module golang.org/x/net to v0.62.0 [security] by @renovate[bot] in #16
- chore(deps): update module github.com/alecthomas/kong to v1.17.0 by @renovate[bot] in #19
- chore(deps): update kubernetes by @renovate[bot] in #22
- chore(deps): update module golang.org/x/crypto to v0.59.0 [security] by @renovate[bot] in #20
- feat(deps): bump aicr to v1.3.0 by @jonasz-lasut in #23
- feat!: overlay-based Input and aicr v1.3.0 features by @jonasz-lasut in #25
- docs: add a documentation site by @jonasz-lasut in #27
- test(e2e): add the end-to-end harness by @jonasz-lasut in #28
- fix: create the namespace a manifest needs by @jonasz-lasut in #30
- test(e2e): deploy a catalog of the suite's own by @jonasz-lasut in #31
- feat: place components on node pools by @jonasz-lasut in #32
- fix: keep an OCI repository that ends in its chart by @jonasz-lasut in #33
- test(e2e): deploy a stock recipe on KWOK nodes by @jonasz-lasut in #34
- test(e2e): cover the rest of the rollout order by @jonasz-lasut in #35
- test: fix what a review of the stack found by @jonasz-lasut in #36
- feat: run AICR's bundle checks by @jonasz-lasut in #37
- ci(e2e): run the suite on a label only by @jonasz-lasut in #38
- test(e2e): make the suite's logs readable by @jonasz-lasut in #44
- chore(deps): update module go.opentelemetry.io/otel/trace to v1.47.0 [security] by @renovate[bot] in #39
- chore(renovate): automerge the e2e group by @jonasz-lasut in #45
- chore(deps): update github/codeql-action action to v4.39.4 by @renovate[bot] in #42
- chore(deps): update dependency errata-ai/vale to v3.28.1 by @renovate[bot] in #43
- chore(deps): update module golang.org/x/net to v0.62.0 [security] by @renovate[bot] in #40
- chore(deps): update e2e by @renovate[bot] in #41
- chore(renovate): keep the e2e k8s libraries with crossplane by @jonasz-lasut in #46
- docs(design): add upgrade approval one-pager by @jonasz-lasut in #47
- chore(package): redraw the function icon by @jonasz-lasut in #49
Full changelog: v0.2.0...v0.3.0