Skip to content

Artifact storage

Every installation names two storage destinations. The registry holds images; the bucket holds objects. Both are tenant-owned resources you create and name, and the node is what writes to them.

What lands where

Destination Holds Written by
Registry The runtime image the node pulls, project runtime images your builds produce, model images The node's build identity, pushing
Bucket Package artifact bytes, observability payload bodies The node's runtime and build identities
flowchart LR
  B["Build on the node<br/>build identity"] -->|"push image"| R["Registry"]
  B -->|"put object"| K["Bucket"]
  RT["Project runtime<br/>runtime identity"] -->|"pull image"| R
  RT -->|"put payload body"| K
  B -.->|"digest and reference only"| CP["Control plane"]
  RT -.->|"digest and reference only"| CP

Metadata crosses to the control plane in both cases. See The tenant byte boundary.

The registry root and the runtime image

artifact_registry.path is a full registry root, a host plus a repository root, and the runtime image is derived from it when you do not name one:

runtime:
  image: <region>-docker.pkg.dev/<gcp-project-id>/<repository>/xratu-data-plane:latest

Override with --runtime-image when you mirror or pin. The scheme and shape rules for both paths, and the refusals that enforce them, are in Registry and bucket schemes.

You create both, Terraform grants access to them

The generated Terraform creates identities and grants:

grep '^resource' install/${DP_INSTALL}/terraform/main.tf

Every line is a service account, role, managed identity, policy, role assignment, or federation binding. Create the repository and the bucket in your own infrastructure first, then name them on the installation, and the grants rendered here bind your node's identities to them.

What the grants allow

Two identities are rendered per installation, a runtime identity and a build identity:

Resource Grants
google_project_iam_member.runtime_artifact_registry_writer Runtime writes to Artifact Registry
google_artifact_registry_repository_iam_member.publish_delegate_repository_writer The publish delegate writes to the named repository
google_storage_bucket_iam_member.runtime_bucket_object_admin Runtime reads and writes bucket objects
google_storage_bucket_iam_member.build_bucket_object_admin Build reads and writes bucket objects
google_service_account_iam_member.runtime_workload_identity Binds the Kubernetes service account to the runtime identity
Resource Grants
aws_iam_role_policy.runtime_ecr Runtime pulls and pushes to ECR
aws_iam_role_policy.runtime_s3 Runtime reads and writes bucket objects
aws_iam_role_policy.build_ecr Build pushes to ECR
aws_iam_role_policy.build_s3 Build reads and writes bucket objects
aws_iam_role.runtime, aws_iam_role.build The roles the pods assume through IRSA
Resource Grants
azurerm_role_assignment.runtime_acr_push Runtime pushes to the named registry scope
azurerm_role_assignment.build_acr_push Build pushes to the named registry scope
azurerm_role_assignment.runtime_bucket_blob_data_contributor Runtime reads and writes blobs
azurerm_role_assignment.build_bucket_blob_data_contributor Build reads and writes blobs
azurerm_federated_identity_credential.runtime, .build Federates the Kubernetes service accounts to the managed identities

Azure is the one cloud that needs the registry named twice: once as a path for pushes, and once as artifact_registry_scope, a resource ID, because role assignments are scoped by resource rather than by project.

How bytes are reached

Each identity resolves credentials from the cluster's workload identity federation: a pod assumes its cloud identity, and the storage client draws from that ambient identity.

Where an explicit credential is configured instead, what the control plane holds is a reference and a fingerprint, not the material:

{
  "credential_kind": "...",
  "credential_fingerprint": "...",
  "credential_source": "...",
  "upload_target_ref": "...",
  "upload_expires_at": "..."
}

A fingerprint identifies which credential was used.

Publishing from a workstation

xratu publish runs on a laptop and sends its bytes to your storage directly. The publish path is a contract:

sequenceDiagram
    participant C as CLI
    participant CP as Control plane
    participant S as Your bucket
    C->>CP: request publication upload contract
    CP-->>C: upload target ref, expiry, scoped grant
    C->>S: upload bytes directly
    C->>CP: complete publication (digest, size)
    CP-->>C: publication recorded

The contract is actor-scoped and expires. The control plane issues it and records the digest and size reported back to it.

Lifetime

The registry and the bucket outlive any one installation and are commonly shared across a platform. They are named on an installation rather than created by one, so a bundle can be regenerated without affecting stored artifacts.

Adding a bucket or repository resource to terraform/main.tf works once and then stops working. A re-prepare regenerates the file unconditionally, and the grants reference the registry and bucket as literal strings rather than as Terraform resources, so there is no dependency edge to order them. See Registry and bucket schemes.