Skip to content

Phaleron

This project is a PoC and represents the outcome of some investigations into an ideal future state for infrastructure provisioning and management for cells going forward.

The outcome of this work is that we’ll have an explicit domain boundary mapped out, and a clear ownership model for all of the teams involved. This alignment will help to improve the clarity between the teams and reduce the operational burden of managing N+ cells going forward.

This repo is the umbrella for the “phaleron” operating-model demo. It holds no code or configuration that the demo needs: it describes how the three repositories below fit together, and holds runbooks for common changes moving through them, each with a step-by-step video.

Phaleron was the harbour of ancient Athens that Theseus sailed from. Theseus builds the ship; Phaleron is where every voyage, every rollout across rings and cells, sets out from.

Domain Mapping

The most important outcome of this work is how we split the responsibilities across teams. With an explicit domain map, we can ensure that we’re not solving the same problems in multiple places, and that we’re not duplicating effort.

This will help us to improve operational efficiency, as well as alleviate the burden currently placed on teams such as dedicated.

    flowchart TB
  subgraph cust["What a self-managed customer provides"]
    direction LR
    P["<b>Platform infrastructure team</b> (dedicated)<br/>clusters · networking · load balancers<br/>Kubernetes, node image and CNI upgrades<br/>on-call for cluster health"]
    R["<b>Managed services team</b> (Runway)<br/>Postgres · Redis · NATS<br/>versions · configuration · credentials"]
  end
  T["<b>Theseus</b><br/>install and upgrade tooling<br/>used on every cell, shipped to customers"]
  G["GitLab running in a cell"]
  F["Product teams"]
  P -->|"a cluster"| T
  R -->|"managed services"| T
  T --> G
  F -.->|"request a new managed service:<br/>review and approval"| R
  

How Do We Provision a Kubernetes Cluster - Platform Infrastructure Team

Every cell is a distinct kubernetes cluster. It can be run on AWS, GCP, Azure, or custom hardware. Going forward, the platform infrastructure team (dedicated) will be responsible for solving the business problem of “How do we provision kubernetes clusters for cells?”.

The team will be responsible for the following:

  • Provisioning the cluster
  • Provisioning the networking
  • Provisioning the load balancers
  • Upgrades to the cluster
  • Upgrades to the node images
  • Upgrades to the kubernetes version
  • Upgrades to the CNI version

They will maintain an on-call rotation that is focused primarily on keeping these clusters up and healthy.

How Do We Manage Services - Platform Services Team + Runway

We expect customers to provide managed services going forward. The managed services team (Runway) will be responsible for the following:

  • Provisioning the managed services
  • Upgrades to the managed services
  • Upgrades to the managed service versions
  • Upgrades to the managed service configurations
  • Upgrades to the managed service credentials

This team will also act as the main gatekeepers for product teams to request new managed services. They will be responsible for ensuring that the managed services are available in all regions, and that they are compatible with the customer’s requirements. Product teams will not prescribe all of their infrastructure needs onto the platform: the platform services team owns the interface that provides each managed service, and new managed services must go through an appropriate process to ensure that they are not building solutions that cannot work in self-managed customer environments. Within that interface, product teams can scale and tune the performance aspects of their own service instances (see Shared ownership).

How Do We Install + Upgrade Services - Theseus

Theseus provides the tooling that customers use to install and upgrade their GitLab installations. It is the tooling that is used to install and upgrade GitLab on all cells. This tooling will be used to install a GitLab instance on top of the clusters provided by the platform infrastructure team, and the managed services provided by the managed services team.

This tooling will be provided to customers as a standard part of their GitLab installation. It will be used to install and upgrade GitLab on their own clusters and managed services.

Overview

Three repositories, two layers. The infrastructure layer splits into code and config. The application layer is config only: GitLab is installed from stock charts.

RepositoryLayerRole
phaleron-infrastructureInfrastructure codeTerraform module definitions only.
phaleron-infrastructure-configInfrastructure configOne thin root module plus tfvars per cell; pins a module version.
phaleron-configApplication configGitLab.com’s fleet control plane, not shipped to customers: ring-pinned chart versions plus per-cell values, synced to each cell by a cell-local Argo CD.
    flowchart LR
  A["Cell config<br/>(phaleron-infrastructure-config)"] --> B["Cell module<br/>phaleron-cell/aws<br/>(module registry)"]
  B --> C["EKS cluster + VPC"]
  C --> D["Outputs package<br/>cell-outputs-#lt;cell#gt;<br/>(private registry)"]
  D --> E["Theseus tooling installs Argo CD<br/>and the root Application;<br/>outputs supply cluster connection + region"]
  E --> F["Argo CD syncs ring pins + cell values<br/>(phaleron-config)"]
  F --> G["GitLab installed<br/>from stock charts"]
  

For runbooks, each with a step-by-step video, see docs/runbooks: infrastructure covers provisioning a cell, rolling out an EKS version, recovering from failed rollouts and routine cluster maintenance; application will cover how application changes work their way through the cells.

The boundary rule

The infrastructure layer produces only what a self-managed customer would have to bring themselves: a cluster and the managed services GitLab needs. The GitLab install then runs against it as it would against theirs.

Dependencies point one way: config → code within the infrastructure layer; application → published infrastructure outputs across layers. Nothing in the infrastructure layer knows GitLab exists.

Ownership

Three teams, three problem domains. The line between them is the line between what a self-managed customer brings and what GitLab ships to that customer. phaleron-config sits outside both: it is GitLab.com’s control plane for running many instances, and it is not shipped.

    flowchart TB
  subgraph bring["What a self-managed customer brings"]
    direction LR
    subgraph infra["Platform infrastructure team"]
      I1["phaleron-infrastructure<br/>(cell module)"] --> I2["phaleron-infrastructure-config<br/>(one root per cell)"]
      I2 --> I3["EKS cluster + VPC<br/>node groups"]
    end
    subgraph runway["Runway"]
      R1["Managed services<br/>Postgres · Redis · NATS"]
    end
  end
  subgraph ship["What GitLab ships to customers"]
    subgraph theseus["Theseus"]
      T1["Install and upgrade tooling<br/>(Argo CD approach)"]
    end
  end
  subgraph fleet["GitLab.com only: not shipped"]
    C["phaleron-config<br/>fleet control plane:<br/>ring pins + per-cell values<br/>for many instances"]
  end
  CU["A customer's own config<br/>for their installation"]
  I3 -->|"outputs package:<br/>endpoint, CA, region"| T1
  R1 -->|"service endpoints<br/>and credentials"| C
  C -->|"one cell's config,<br/>per cell"| T1
  CU -.->|"self-managed:<br/>takes phaleron-config's place"| T1
  T1 --> G["GitLab running in the cell"]
  
TeamOwnsWhere it lives
Platform infrastructure teamEach cell’s cloud footprint (network, EKS cluster, node groups), its lifecycle (upgrades, node image patching, drift, state), and the outputs package that hands the cluster over.phaleron-infrastructure, phaleron-infrastructure-config
RunwayThe managed services each cell’s GitLab depends on: Postgres, Redis, NATS.Not part of this demo
TheseusThe tooling a customer uses to install and upgrade a GitLab installation with Argo CD.Shipped to customers. On GitLab.com, phaleron-config drives it across the fleet.

phaleron-config is not part of the product. It is the control plane GitLab.com uses to manage many instances: which chart versions each ring runs, how a version is promoted from ring to ring, and each cell’s values. A self-managed customer running one installation supplies their own config to the same Theseus tooling instead.

The platform infrastructure team is the teams that historically owned Instrumentor and infrastructure provisioning and maintenance. They continue to own this problem, finely scoped to provisioning exactly what we expect a self-managed customer to provision for us in the future, and nothing more. Runway’s scope is set the same way, for managed services.

The test for any new piece of work: would a self-managed customer have to provision this themselves before installing GitLab? If it is a cluster, it belongs to the platform infrastructure team; if it is a managed service, to Runway. If it is how GitLab gets installed or upgraded, it belongs to Theseus. If it only exists because GitLab runs on top, it belongs to neither the platform infrastructure team nor Runway.

Why this split

  • Problem domains stay compartmentalised. Our customers will be expected to provision clusters and managed services themselves, so how we provision ours is abstracted away from feature teams. Nothing a feature team builds depends on it.
  • We dogfood the customer experience daily. Every GitLab.com cell is installed and upgraded with the same Theseus tooling a customer uses, so its rough edges reach us first.
  • One tool, not two. There is no disparity between the tools we use and the tools we ship to customers: they are the same tool, and customers get standard tooling to manage their own installations.
  • We are opinionated about the infrastructure we provide. Product teams cannot impose new infrastructure on every cell. New infrastructure, such as another managed service or a new node type, goes through a review and approval process before it is provisioned, because it has to work in every cell, and every self-managed customer must be willing and able to run it too. Within those guardrails, teams tune the infrastructure their own services run on: see Shared ownership.
    flowchart LR
  E["phaleron-config<br/>GitLab.com fleet control plane"] -->|"many instances"| T
  O["A customer's own config"] -->|"one installation"| T
  T["Theseus install and upgrade tooling<br/>(Argo CD approach)"]
  T --> D["GitLab.com cells<br/>installed and upgraded every day"]
  T --> S["Self-managed customers<br/>on their own clusters and managed services"]
  D -.->|"what we learn running it"| T
  

Shared ownership

Clusters and managed services are owned centrally, but not every decision about them is central. Some services, such as Orbit, are compute and memory heavy and need tuning that generic defaults cannot give them. Shared ownership splits the decisions: the platform services team owns the interface that provides each managed service, and product teams scale and tune their own service instances through it, without prescribing the rest.

Owned centrally (platform infrastructure team, Runway and the platform services team)Owned by the service team
The interface that provides each managed service: how a service requests an instance, connects to it, and what it can rely on.Scaling and performance tuning of its own service instances, through that interface.
Which versions of each managed service are supported, and keeping every cell inside that window.Which supported version its service runs against, and testing the upgrade with its own SLOs.
Security updates and the baseline every cell, and every self-managed customer, can rely on.Its own node pools and sizing, where generic autoscaling does not fit the workload.
Shared instances of managed services, and the guardrails for adding new ones.At GitLab.com scale, its own instance of a managed service (for example NATS) when a shared one does not fit its workload, requested through the same interface.

Two rules keep this workable:

  • One version story per managed service. Self-managed customers cannot run Postgres 18 for one service and Postgres 19 for another, so the supported window is set once per managed service, and every service team works inside it.
  • The window follows the upstream. A managed service whose upstream ships breaking changes often, such as ClickHouse, which has no semantic versioning, ships breaking changes monthly, and is supported for its previous three minor versions, rolls through the cells at least quarterly. Self-managed customers who run it have to keep up at the same pace.

What a service team owns on GitLab.com may differ from what a self-managed customer runs: Orbit may run its own NATS at GitLab.com scale while a self-managed installation uses the shared one. That divergence is deliberate, and limited to scale, never to the interfaces the service depends on.

In practice, a service team resizes its own instance for one cell with an MR to that cell’s configuration in phaleron-config; see Resizing a managed service for one cell.

Component ownership model

Every component has one owning team, and that team owns it end to end: the code, the chart, the SLIs and alerts that describe its health, its rollout, and the page when it breaks. Platform teams own the foundations every cell needs; application teams own the services that run on them. All of them ship through the same mechanisms: pins in phaleron-config, promotion through rings, Argo CD in each cell, and Metropolis turning each team’s SLIs into alerts in every cell.

Each runbook below has a step-by-step video; see docs/runbooks for the videos, walkthroughs and sources.

Application teams: a component’s life

An application team (shown with Orbit as the example) owns its service from the first merge to the page:

StageWhat the owning team doesRunbook
Join the platformBring a Fairway manifest, which generates the Helm chart and declares the managed services it needs, plus SLOs; one versions file puts the service in every cell.A new service joins the platform
Ship a changeMerge to main; the new version rolls out ring by ring with no further action.A new version
Ship its monitoringPut the SLIs and SLO targets for the change in the same MR; every cell compiles them.A change ships with its SLIs
A rollout fails in one cellThe cell rolls itself back on the team’s own metrics; the team gets a non-paging alert and fixes forward.A failed deployment
Get pagedThe page routes to the team that wrote the SLI; they find the bug and roll the fix forward.Paged for one cell
Handle a low-severity incidentA failure that does not break GitLab is a P3/4: no page, a config change the same day and a code fix after.A low-severity incident
Resize its managed servicesChange the size of its own managed service instance for one cell in phaleron-config, within the sizes the platform services interface offers.Resizing a managed service

Flexible change management

The team that makes a change owns it, including deciding how urgent it is when it goes wrong:

  • No approval gate to ship. A team ships by merging; it does not need another team’s sign-off to release. The platform’s contract is simple: give it a Helm chart and a managed service definition, and it handles the rest. With Fairway, both come from one manifest.
  • Teams set their own severity. The SLO definitions a team ships decide which alerts page and which do not. A modular service whose failure does not break GitLab, such as Orbit serving stale data that carries no SLA, can treat that failure as a P3/4 and fix it when it can.
  • Mitigate inside your own component. A team may mitigate with a configuration change in its own service, then follow with a code fix through the rings.

Platform teams: the foundations

OwnerOwns end to endRunbooks
Platform infrastructure teamEach cell’s cluster: provisioning, Kubernetes and node image upgrades, upstream module changes, drift and Terraform state.Provisioning a cell, EKS version rollout, node image patching, upstream module bump, drift, stuck state lock, a module bug in a rollout
Observability teamThe o11y stack in every cell: Metropolis and the Prometheus and Grafana it targets.An o11y stack in every cell
Runway and the platform services teamManaged services such as Postgres, Redis, NATS and ClickHouse: supported versions, security updates and shared instances. See Shared ownership.None yet.
TheseusThe install and upgrade tooling every cell, and every customer, uses.Underpins every application runbook: each one is a change applied by this tooling.

Where ownership meets

Some problems start in one team’s component and end in another’s. The runbooks show who acts at each hand-off:

  • Infrastructure finds it, the application owner fixes it. A node drain blocked by one cell’s application settings is found by the platform infrastructure team and fixed by the team that owns the configuration: a blocked node drain (video not exported yet).
  • The platform protects users, the owner fixes the cause. Argo Rollouts rolls a failing cell back automatically, so the owning team is alerted without a page: A failed deployment.
  • The owner’s SLIs drive the platform’s decisions. The same SLIs a team ships are what a rollout’s analysis and the paging alerts use: A change ships with its SLIs.