Skip to content

Production install

This guide installs a permanent Liftway for a team: two controllers behind HTTPS, an external PostgreSQL, an existing Vault, Kubernetes runners and a NetworkPolicy. When you finish, nothing runs on your laptop — no make, no port-forward.

Download production.values.yaml

Throughout, the examples use context prod-cluster, namespace runway-prod, release runway and host runway.example.com. Replace them. Run Helm commands from the root of the backend repository, which contains the chart at deploy/helm/runway (chart version 0.3.7, app version 0.3.0).

Before you begin

Liftway is for trusted operations teams. It has personal accounts, roles and SSO, but no tenant isolation. Keep it on an internal network or behind your identity gateway. See Limits and boundaries.

1. What you are building

Part Created by Notes
Controller Deployment (2 pods), Service, PDB The chart Stateless in HA; all state in PostgreSQL
Log worker Deployment The chart 2 replicas recommended
ServiceAccounts, Roles, NetworkPolicy, HTTPRoute or Ingress The chart Namespace-scoped only
Runner Jobs Liftway, per step Temporary
PostgreSQL Your DBA or operator (e.g. Crunchy PGO) Direct primary connection, TLS verify-full
Vault Your Vault team KV v2 mount + Kubernetes auth for this cluster
Gateway / Ingress controller, DNS, certificate Your platform team HTTPS listener for the Liftway host
Container image Your CI Immutable tag = full commit SHA
Optional: Dragonfly/Valkey/Redis, S3 bucket Your platform team Can be added later

2. Prepare dependencies

PostgreSQL

  • A database runway and a user with CONNECT and CREATE on it. Superuser is not needed; Liftway creates its tables at startup.
  • A direct connection to the primary. Liftway relies on session-level advisory locks, which transaction-pooling PgBouncer breaks. A session-mode pooler is acceptable.
  • TLS with a certificate whose SAN matches the host in the URL; the chart sets PGSSLMODE=verify-full. The URL must not override it with a weaker sslmode.
  • Connection budget: each controller uses up to database.poolSize pooled connections plus up to 16 coordination sessions; each log worker uses logWorker.poolSize. With the example values: 2 × (8 + 16) + 2 × 8 = 64 connections, plus headroom for migrations and your own tools.
  • Backups outside this cluster, with a tested restore. A backup volume in the same cluster does not survive losing the cluster.

The URL has the form postgresql://runway:<url-encoded-password>@<primary-host>:5432/runway. With Crunchy PGO, the generated pguser Secret's uri key can be used directly (set database.secretKey: uri).

Vault

Your Vault administrator provides, for this cluster:

  • a KV v2 mount (here runway-prod);
  • a Kubernetes auth mount (here kubernetes-prod) configured with this cluster's API address, CA and a TokenReview identity — never another cluster's;
  • a reader role for runners and the controller, and a writer role for the controller only.

Commands are in Vault integration.

Exposure

Either:

  • Gateway API (recommended): Gateway API v1 CRDs and controller, an existing Gateway with an HTTPS listener whose certificate covers runway.example.com, and allowedRoutes that admit the runway-prod namespace. The certificate stays on the Gateway; or
  • Ingress: an IngressClass and a TLS Secret runway-tls in runway-prod.

DNS for runway.example.com points at the gateway or ingress. Close or redirect plain HTTP at the gateway — session cookies are Secure and do not work over HTTP.

Image

Use an image your CI has already published, tagged with the full 40-character commit SHA. The chart refuses anything else in strict mode. There is no public Liftway image. For a private registry, prepare a pull credential with read-only access.

3. Namespace and Secrets

kubectl --context prod-cluster create namespace runway-prod

Create these Secrets in runway-prod, preferably through your secret manager or operator (ExternalSecrets, Vault Secrets Operator…). The chart references them; it never generates them.

Secret Key(s) Content
runway-admin password Random initial admin password, at least 16 characters (12–256 accepted, not admin)
runway-db database-url PostgreSQL URL
runway-db-ca ca.crt PostgreSQL CA
runway-terraform encryption-key Fernet key — 32 random bytes, URL-safe base64. Generate once, back up, never regenerate
runway-vault-ca ca.crt Vault CA, if private
runway-registry .dockerconfigjson Pull credential, type kubernetes.io/dockerconfigjson
runway-metrics token Random bearer token for Prometheus (optional)
runway-tls tls.crt, tls.key Only for Ingress
runway-cache url rediss://… URL, only with an external cache
runway-s3 access-key, secret-key Only with S3 log storage

If you must create them by hand, read values from protected files so they never enter shell history:

umask 077
python3 -c 'import base64,os; open("terraform-key","wb").write(base64.urlsafe_b64encode(os.urandom(32)))'
python3 -c 'import secrets; open("admin-password","w").write(secrets.token_urlsafe(32))'

kubectl --context prod-cluster -n runway-prod create secret generic runway-terraform --from-file=encryption-key=terraform-key
kubectl --context prod-cluster -n runway-prod create secret generic runway-admin     --from-file=password=admin-password
kubectl --context prod-cluster -n runway-prod create secret generic runway-db        --from-file=database-url=/secure/database-url
kubectl --context prod-cluster -n runway-prod create secret generic runway-db-ca     --from-file=ca.crt=/secure/postgres-ca.crt
kubectl --context prod-cluster -n runway-prod create secret generic runway-vault-ca  --from-file=ca.crt=/secure/vault-ca.crt
kubectl --context prod-cluster -n runway-prod create secret generic runway-registry \
  --type=kubernetes.io/dockerconfigjson --from-file=.dockerconfigjson=/secure/registry-config.json

Store terraform-key and admin-password in your password manager, then delete the local files.

The encryption key outlives every release

All controllers and all future versions must use the same encryption-key. A new key makes existing Terraform state, saved plans and the assistant token unreadable. Changing runway-admin after the first start does not reset the admin password.

4. Values

Download production.values.yaml and replace every REPLACE. The essentials:

stage: true            # strict render-time checks (historical name)
ha: true
replicas: 2
postgres: {enabled: false}
database: {existingSecret: runway-db, secretKey: database-url, sslMode: verify-full, caSecret: runway-db-ca}
httpRoute: {enabled: true, host: runway.example.com, gatewayName: shared-gateway, gatewayNamespace: gateway-system, sectionName: https}
forwardedAllowIps: "*"
networkPolicy:
  enabled: true
  ingressNamespaceSelector: {kubernetes.io/metadata.name: gateway-system}

With stage: true the chart fails to render unless: development is off, auth is password, bundled PostgreSQL is off, the dev cache is off, Vault is HTTPS (or plain HTTP only to an in-cluster *.svc address), exactly one of Ingress/HTTPRoute is enabled with host and TLS, the database uses verify-full, NetworkPolicy is on, the image tag is a 40-character SHA, and an encryption Secret is named.

Things people get wrong:

  • networkPolicy.ingressNamespaceSelector must select the namespace of the gateway's data-plane pods (for Envoy Gateway, usually envoy-gateway-system), which may differ from the namespace of the Gateway resource.
  • forwardedAllowIps must be set when TLS ends at the gateway. Without it the controller sees http:// while the browser sends Origin: https://…, and every POST fails with Cross-origin request rejected.
  • vault.authPath is the auth mount for this cluster, not the default kubernetes of another cluster.

Every value is described in Helm values.

5. Render, check, install

helm lint deploy/helm/runway -f production.values.yaml

helm template runway deploy/helm/runway \
  --namespace runway-prod -f production.values.yaml > rendered.yaml

kubectl --context prod-cluster -n runway-prod apply --dry-run=server -f rendered.yaml

helm upgrade --install runway deploy/helm/runway \
  --kube-context prod-cluster --namespace runway-prod \
  -f production.values.yaml --atomic --wait --timeout 10m

Read rendered.yaml before installing: image and tag, Secret names, ServiceAccounts, the HTTPRoute host and parent, the NetworkPolicy selector, replica counts. A server-side dry run checks admission, not whether the database or Vault accept the credentials.

If you deploy with GitOps (Argo CD, Flux), commit the values file and let the controller apply it; the steps below are the same.

6. Verify

kubectl --context prod-cluster -n runway-prod rollout status deploy/runway
kubectl --context prod-cluster -n runway-prod rollout status deploy/runway-log-worker
kubectl --context prod-cluster -n runway-prod get pods,svc,httproute,networkpolicy,pdb
kubectl --context prod-cluster -n runway-prod get httproute runway -o jsonpath='{.status.parents[*].conditions}'

The HTTPRoute must report Accepted=True and ResolvedRefs=True. If a controller pod waits in wait-postgres, check the URL, CA, host name, user rights and network to the database.

Then from outside:

curl -fsS https://runway.example.com/healthz          # {"status":"ok"}
curl -fsS https://runway.example.com/readyz           # {"ready":true}
curl -s -o /dev/null -w '%{http_code}\n' https://runway.example.com/api/projects   # 401

Open https://runway.example.com, sign in as admin with the password from your secret manager and change it under Account → Change Password. Check in the browser's developer tools that the runway_session cookie is Secure and HttpOnly.

7. First configuration

Do these in order:

  1. Administration → Settings → Vault configuration: set mount runway-prod and prefix runway/credentials before creating any credential. They must match the Vault policies.
  2. Users: create personal accounts for your team. Administration → Security → Roles & permissions: create roles and assign them. See Roles and permissions.
  3. Credentials: a Git deploy token and a Machine SSH key for a test host.
  4. Execution environments: a Kubernetes environment with your runner image and runway-registry as pull secret.
  5. Projects → sync; Inventories with one test host; an Ansible template with Limit set to that host.
  6. Launch it and read the output. Then a harmless Bash template, a workflow with a failure handler, a cancel, and an approval.
  7. Optional: SSO, S3 log storage, Prometheus, schedules and retention.

8. Acceptance checklist

  • HTTPS only; HTTP redirected or closed; unauthenticated API returns 401
  • Both controllers Ready; deleting one pod keeps the UI and runs going
  • A step survives a controller restart without running twice
  • Git sync, inventory sync, Ansible, Bash, workflow, cancel, approval all verified on test targets
  • Terraform: a test plan in a separate workspace, approval, apply, state inspector
  • Restarting the cache (if any) only slows reads
  • PostgreSQL restored into a separate database with the same encryption key; credentials and Terraform state readable
  • Vault restore tested by the Vault team
  • Alerts on readiness, failed runs, stalled approvals, database storage and backup age
  • Only the intended people can reach the URL; roles reviewed

9. Upgrades

Change only the image tag in your version-controlled values and run the same helm upgrade --install (or let GitOps do it). Before that: confirm a fresh, verified backup, check release notes for schema changes and avoid upgrading during a Terraform apply. Details and rollback rules are in Backup, upgrade and recovery.

Smaller installs

For a quick single-controller trial in an existing cluster with the bundled PostgreSQL, see Helm values → Minimal install. Do not use the bundled PostgreSQL for anything you need to keep.