Lifecycle architecture
Understand how requests become Lifecycle Environments and plan dependencies, security controls, availability, and recovery.
Lifecycle receives requests, builds applications, and deploys Environments to Kubernetes. The following flow shows the components and dependencies that operators must configure.
Request-to-Environment flow
- GitHub delivers a repository event, or an authenticated user calls the UI, CLI, or v2 API.
- Lifecycle authenticates the request and checks the applicable policy.
- Lifecycle uses Postgres for Lifecycle data and Redis for queued work.
- Lifecycle reads
lifecycle.yamland selects the applicable Services. - Lifecycle builds images or invokes external pipelines and applies workloads to Kubernetes.
- When enabled, object storage keeps archived logs and Site content.
- The UI, CLI, API, GitHub comments, and MCP surfaces show the resulting status and logs.
- When one of these events occurs, Lifecycle removes the Environment:
- A pull request closes.
- A user requests removal.
- The Environment TTL expires.
- The API lease expires.
Components
| Component | Responsibility |
|---|---|
| Web | Receives UI, API, and GitHub requests and applies authentication |
| Worker | Runs build, deploy, Agent, Site, and cleanup work |
| Gateway | Serves Site content when the Sites feature is enabled |
| Lifecycle UI | Provides Environments, Sites, Agents, and Settings |
| Keycloak | Provides identity services for the chart authentication configuration |
| Postgres | Stores Lifecycle data, including Environments and configuration |
| Redis | Coordinates queued work for web and worker components |
| BuildKit / registry | Builds and distributes images when the native build configuration is used |
| Kubernetes | Runs Environment workloads, jobs, Services, ingress, and Secrets |
| Object storage | Stores archived build and deploy logs and Site content when configured |
Availability and recovery boundaries
The default values use one web replica, one worker replica, and standalone Redis. This configuration is not a high-availability profile.
- Monitor Postgres and Redis as separate dependencies.
/api/healthreturnsUnhealthywhen either dependency is unavailable. It does not check object storage. - Back up Postgres, configuration Secrets, and the
ENCRYPTION_KEYSecret as one recovery set. Test the matched restore in an isolated deployment. - Decide whether Redis queued-work state must survive a recovery. After an outage or data loss, examine affected Environments before a retry.
- When archived logs or Sites must survive a failure, back up object storage and its credential Secret. Test the object storage restore with the related Lifecycle data.
Trust boundaries
- The default ClusterRole has wildcard Kubernetes permissions. Limit cluster and network access before you expose Lifecycle.
- Use
ENABLE_AUTH=falseonly in an isolated local evaluation. Requests get administrator permissions in this mode. - GitHub App installation, Lifecycle repository onboarding, and a user’s linked GitHub identity are separate authorization relationships.
- Restrict access to the
ENCRYPTION_KEY. If you lose this key, Lifecycle cannot decrypt protected configuration. - Review the permissions, approvals, credentials, and network access for each Agent tool and external MCP connection.
Continue with Security boundaries, configuration surfaces, and day-two operations.