The Kubernetes manifests¶
Five manifests land under k8s/, plus the data plane bootstrap contract under
xratu/. Each is applied separately and in a fixed order, so a failure names
the layer that failed.
flowchart TB
SA["serviceaccounts.yaml<br/>identities exist"] --> WI["spire-workload-identity.yaml<br/>identities are attestable"]
WI --> PA["project-runtime-authority.yaml<br/>what the node may do"]
PA --> FB["managed-private-fabric.yaml<br/>private connectivity"]
FB --> RT["dataplane.runtime.yaml<br/>xratud itself"]
Each layer is a precondition for the next, which is why the order is fixed rather than a convenience.
serviceaccounts.yaml¶
The data plane namespace and the two Kubernetes service accounts, each annotated for the provider so it binds to its cloud identity:
apiVersion: v1
kind: Namespace
metadata:
name: dp-eu-west1
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: xratud
namespace: dp-eu-west1
annotations:
iam.gke.io/gcp-service-account: dp-eu-west1-runtime@<gcp-project-id>.iam.gserviceaccount.com
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: builder
namespace: xratu-build-bootstrap
annotations:
iam.gke.io/gcp-service-account: dp-eu-west1-build@<gcp-project-id>.iam.gserviceaccount.com
The annotation is the cluster half of the federation that terraform/main.tf
sets up on the cloud side, and its key is what changes per provider. Note the
builder sits in its own namespace, xratu-build-bootstrap, rather than in the
data plane namespace. See terraform_main.
spire-workload-identity.yaml¶
The SPIRE deployment and its registration entries, so a workload on the node can be attested and issued a workload identity rather than holding a long-lived credential. It opens by establishing the SPIRE namespace and its service accounts:
apiVersion: v1
kind: Namespace
metadata:
name: spire-system
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: spire-server
namespace: spire-system
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: spire-agent
namespace: spire-system
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: spiffe-csi-driver
namespace: spire-system
The registration entries that follow are rendered per node from the install identity and the node count.
The SPIRE agent runs beside xratud as a peer process. See
Trust and workload identity.
project-runtime-authority.yaml¶
What the node is permitted to do inside the approved project runtime namespaces. It is rendered from the data plane namespace, the runtime service account, and the list of approved project runtime namespaces in the install spec.
It creates the project runtime namespace and grants the node's service account authority inside it:
apiVersion: v1
kind: Namespace
metadata:
name: dp-eu-west1-projects
labels:
xratu.io/runtime-namespace-kind: project
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: xratud-project-runtime-authority
namespace: dp-eu-west1-projects
rules:
- apiGroups: [""]
resources: ["pods", "services", "endpoints", "events"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
This manifest is what makes a node able to host project runtimes at all. A node whose capability reports no approved project runtime namespace is rejected as a placement candidate. See Pools, tenant scope, and placement.
managed-private-fabric.yaml¶
The managed private fabric on the node, which carries private routes between
data planes and a project's calls to a model on another node. The runtime fabric
is architecture-fixed as xratu_managed_private_fabric, and the manifest is
rendered rather than configured: no install flag selects fabric peers or binding
route policy.
It runs as its own deployment with its own service account in the data plane namespace:
apiVersion: v1
kind: ServiceAccount
metadata:
name: xratu-fabric-agent
namespace: dp-eu-west1
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: xratu-fabric-agent
namespace: dp-eu-west1
spec:
replicas: 1
See Pools across regions and clouds.
dataplane.runtime.yaml¶
The xratud workload, together with the in-namespace Role and RoleBinding it
runs under:
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: dp-eu-west1
namespace: dp-eu-west1
spec:
serviceName: dp-eu-west1
persistentVolumeClaimRetentionPolicy:
whenDeleted: Retain
whenScaled: Retain
replicas: 1
template:
spec:
serviceAccountName: xratud
initContainers:
- name: xratud-enrollment-bootstrap
Two details carry meaning. The retention policy is Retain on both delete and
scale, which is what preserves the node's durable identity across scale-down.
And an init container reads the injected invitation before xratud starts,
which is why the enrollment secret is applied first. See
Identity continuity and
Apply ordering.
The workload kind is fixed to statefulset, because stable ordinal pod names
are what the node labels and the per-node invitation mapping are derived from.
See StatefulSet requirement.
xratu/dataplane.bootstrap.yaml¶
The data plane bootstrap contract document, rendered from the install spec. It is the data plane half of the pair whose hashes the organization's trust bundle covers. See Bootstrap reconcile.
How they are applied¶
apply reads each manifest from disk and pipes it to kubectl apply. Because
the file on disk is what is read, an edit you make after prepare is what
reaches the cluster.
A failure reports the layer and the kubectl error, and stops the apply: