One bundle, two layers¶
A bundle holds a cloud layer and a workload layer, generated together from one spec. Terraform creates the cloud identities; the Kubernetes manifests create the service accounts that assume them.
flowchart TB
S["install.input.yaml<br/>one spec"] --> TF["terraform/main.tf<br/>cloud identities and IAM"]
S --> K8S["k8s/*.yaml<br/>service accounts and workload"]
TF -->|"identity to assume"| F["Federation"]
K8S -->|"annotated service account"| F
F --> N["A node that can reach<br/>your registry and bucket"]
Why they are generated together¶
The two layers meet at the federation binding, and that binding names values
from both sides at once: the cloud identity created by Terraform, and the
Kubernetes service account named in the manifest, in the namespace derived from
dp_install.
Generating them from one spec means those names are consistent by construction. Generated apart, the annotation on the service account and the trust policy on the cloud identity would each have to be given the other's values by hand, in the exact form the provider expects, and each provider expects a different form:
| Provider | The annotation the manifest carries | What Terraform must trust |
|---|---|---|
| GCP | iam.gke.io/gcp-service-account |
WorkloadIdentityUser binding to the KSA |
| AWS | eks.amazonaws.com/role-arn |
AssumeRoleWithWebIdentity trust per KSA |
| Azure | azure.workload.identity/client-id |
Federated identity credential per KSA |
One spec, two rendered layers, and the pairing is the adapter's job rather than yours.
What each layer owns¶
| Layer | Owns |
|---|---|
| Cloud | Identities, IAM policy, registry and bucket access, federation trust |
| Workload | Service accounts and their annotations, workload identity entries, runtime authority, the fabric, the xratud workload |
The boundary is the identity: the cloud layer creates something to assume, the workload layer creates something that assumes it.
What this buys¶
One command per installation. Standing up a node is one contract rather than a cloud ticket and a cluster ticket that have to agree.
The same workflow on every cloud. The spec shape and the lifecycle are identical across providers, and the provider-specific materialisation is hidden behind the adapter. No provider branching appears in the operator workflow.
Failures that name a layer. Terraform runs first and stops the apply on failure, so a cloud problem leaves the cluster untouched. See Apply ordering.
One target, one cloud¶
An installation targets one cloud. A deployment spanning clouds is several
installations, each with its own dp_install and its own bundle directory,
enrolling into the same organization. See
Multi-cloud architecture.