Repository navigation
feat(metal): Let customers install images from a published catalog - #192
Conversation
9e6166d to
5b0555d
Compare
Installations named an image as name@sha256 and only a test parser read it. The provider now defines immutable MachineImages by digest and publishes them into consumer tenants. A published copy names its publisher with a typed publisherRef plus the image's name, and a protected publication record names the consumer with a typed consumerRef. A tenant is a Milo Project, or a Namespace in standalone mode; every other kind is refused, and Publish writes nothing for one. No spec holds an object UID. The record's name derives from the consumer tenant, copy and provider image UIDs, and its spec holds names and the digest. Admission reads the copy and the provider image, looks up the record under the derived name, and refuses a missing record, so a recreated tenant, copy or provider image is refused. Republishing a recreated image writes its own record. Admission also refuses a withdrawn image and checks architecture and firmware mode against the allocation's hardware. The DeviceInstallation keeps the digest and the image's firmware modes, and each install worker reads the server's firmware mode again before it sends anything. Customer roles may only read and use images, and the publisher may delete stale records. The standalone and multi-plane compositions publish their one image and resolve it with a fixture authorizer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5b0555d to
00111b7
Compare
|
@ecv please review exact head |
|
@ecv the final head for review is |
ecv
left a comment
There was a problem hiding this comment.
Approve.
Customers install only images the provider published to their project: admission resolves the Installation's image through a provider-side publication record bound to the consumer tenant, the copy and the provider image by UID, and pins the digest from the record. I mutated the catalog at this head (record spec match, publisher match) and each fails a test.
- Cross-project read and install holds. A customer role gets only
machineimages.use(consumer, claimant) and list/get/watch on its own project's copies (viewer); it holds no create, update or delete on images or on publication records. Records live in the provider project and only the publisher role creates or deletes them. A hand-made copy naming a provider image, or a recreated copy, tenant or source, finds no record and is refused. The record is immutable (self == oldSelf) and the image's definition and source are immutable. - No Milo IAM image-use check exists yet: the authorizer in the multi-plane and standalone runs allows every creator, so
machineimages.useis not exercised by any test.Catalog.Authorize == nilrefuses, so a deployment that wires nothing fails closed, but the allow-all func lives in non-testinternal/multiplane. Add a real authorizer test, and keep production wiring out of that package. - The webhook that rejects image writes from anyone but the publisher is not implemented (the doc says so); IAM alone keeps customers from writing images. A holder of the publisher role in a consumer project can write copies and status there; the record still gates entitlement, so this entitles nothing, but bind that role to the Fleet publisher only.
Installnow refuses any image the catalog did not resolve andParseImageis gone, so the production release flow has no path to install until it callsCatalog.Resolve. Only the two lab runners call it today.- The allocator change shares
allocator.go,harness_test.goandmultiplane/seed.gowith #193: git reports conflicts merging the two. Whichever lands second must resolve them, keepingpinCleaningand the catalog image together, and re-run the allocation tests.
Follow-ups:
- Multi-plane runs of the image catalog are not verified (the doc says so).
ecv
left a comment
There was a problem hiding this comment.
Approve.
The delta since my last review is a merge of the updated stack base, which now carries the merged cleaning policy, drive discovery, power UI and multi-plane changes. The hand resolutions keep both sides: the catalog and cleaning imports and fixtures, both CRDs and protected resources, and the installation-requester role holding both cleaningpolicies get and sealedpayloads create. Earlier findings stand.
Implements the image catalog increment of #184. Customers select a published MachineImage by name. Admission verifies the consumer tenant, published copy and provider image incarnations, checks architecture and firmware compatibility, and pins the digest and allowed firmware modes on the DeviceInstallation. An admitted operation retains its inputs after catalog changes. Bootstrap data remains unsupported.
Integrates staging through #189 (
a4327a43). Firmware mode comes from commissioning evidence through the existing capacity projector; publishing an image does not write capacity status. Redfish checks the current boot mode before network boot or virtual media, and refuses unknown or incompatible firmware before effects. The local VM worker requires BIOS. Physical BMC qualification and production image-use authorization remain outside this increment.Local validation includes build, vet, catalog and worker race tests, Kustomize renders, overlay and network isolation checks, and documentation links. Live multi-plane acceptance was not run.