Architecture

Architecture #

The operator follows the standard controller-runtime model: each custom resource has a reconciler that drives observed state toward desired state.

Custom resources #

KindShortPurpose
TemporalClustertcA complete Temporal server deployment.
TemporalNamespacetnsA namespace within a managed cluster.
TemporalSearchAttributetsaA custom search attribute registration.
TemporalClusterClienttccGenerated mTLS client credentials.

TemporalCluster reconciliation #

The TemporalCluster reconciler runs a sequence of sub-reconcilers:

  1. Persistence — probes the datastore(s) and runs schema setup/migration via temporal-sql-tool / temporal-cassandra-tool Jobs (SQL, Cassandra) or inline index-template application (Elasticsearch). Sets PersistenceReachable and SchemaReady.
  2. mTLS — issues internode and frontend cert-manager Certificates and sets MTLSReady.
  3. Upgrade — when spec.version differs from the running version, runs an ordered, per-service rolling upgrade state machine (status.upgrade).
  4. Services — renders the server config (stored in a Secret, since it embeds credentials) and server-side-applies the Deployments, headless Services, a frontend Service, and PodDisruptionBudgets. Sets Available.
  5. UI / Monitoring — optionally deploys temporal-ui and a ServiceMonitor.

Ready is the rollup of PersistenceReachable && SchemaReady && Available (and MTLSReady when mTLS is enabled). status.phase reports Pending → ProvisioningSchema → DeployingServices → Ready (or Upgrading).

Version matrix #

Supported Temporal versions and their schema/UI requirements live in internal/temporal/versions_gen.go, generated from hack/version-matrix.yaml.