Skip to main content

Upgrade Guide

For the full upgrade → verify → rollback → uninstall checklist, see Maintenance Cycle.

How to upgrade STOA Platform between versions with zero downtime.

Upgrade Strategy​

STOA uses rolling updates by default. The upgrade order matters:

1. CRDs (if changed)
2. Database migrations (Alembic)
3. Control Plane API
4. STOA Gateway
5. Console UI + Portal

Pre-Upgrade Checklist​

  • Read the release notes for breaking changes
  • Back up PostgreSQL (see Backup & Recovery)
  • Export the shared stoa Keycloak realm (ADR-074)
  • Note current versions: helm list -n stoa-system
  • Verify cluster health: kubectl get pods -n stoa-system

Upgrade Steps​

1. Update CRDs​

Helm does not upgrade CRDs automatically. Apply them manually:

kubectl apply -f charts/stoa-platform/crds/

2. Run Database Migrations​

If the release includes schema changes:

kubectl exec -n stoa-system deploy/control-plane-api -- \
alembic upgrade head

3. Upgrade Gateway Helm Release​

charts/stoa-platform lives inside the stoa-platform/stoa checkout (no hosted Helm repository is published yet) and manages the gateway workload and CRDs; upgrade Control Plane, UIs, and Keycloak via your GitOps/deployment manifests alongside it:

helm upgrade stoa-platform ./charts/stoa-platform \
-n stoa-system \
-f my-values.yaml

4. Verify​

# Check pod status
kubectl get pods -n stoa-system

# Verify versions
kubectl get deploy -n stoa-system -o jsonpath='{range .items[*]}{.metadata.name}: {.spec.template.spec.containers[0].image}{"\n"}{end}'

# Health checks
curl -s https://api.<YOUR_DOMAIN>/health
curl -s https://mcp.<YOUR_DOMAIN>/health

Rolling Back​

Prefer the ordered checklist in Maintenance Cycle §5. Summary:

Helm Rollback​

# List history
helm history stoa-platform -n stoa-system

# Rollback to previous revision
helm rollback stoa-platform <REVISION> -n stoa-system
kubectl rollout status deploy -n stoa-system --timeout=5m

Re-run the post-upgrade verification controls after rollback.

Database Rollback​

Destructive

alembic downgrade can destroy or reshape data. If the migration already backfilled or dropped data, restore PostgreSQL from the pre-upgrade backup instead of downgrading (Backup and Recovery, Maintenance Cycle §5.2).

Only when release notes document a safe downgrade:

kubectl exec -n stoa-system deploy/control-plane-api -- \
alembic downgrade -1

Then confirm Helm revision and application health before closing the change.

Version Compatibility​

ComponentCompatibility Rule
Control Plane APIMust match database schema version
STOA GatewayCompatible with CP API N and N-1
Console UICompatible with CP API N and N-1
PortalCompatible with CP API N and N-1
CRDsMust be applied before chart upgrade
Keycloak26.x (stoa realm, ADR-074); test major upgrades in staging

Zero-Downtime Upgrades​

STOA supports zero-downtime upgrades when:

  1. Multiple replicas are running (replicas >= 2)
  2. PodDisruptionBudget is configured:
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: stoa-gateway-pdb
namespace: stoa-system
spec:
minAvailable: 1
selector:
matchLabels:
app: stoa-gateway
  1. Readiness probes are configured (default in Helm chart)
  2. Database migrations are backwards-compatible (additive only)

Cookies and privacy

With your permission, we use cookies to measure visits and understand navigation to improve the site.

Learn more

Google Analytics measures visits and useful clicks. Microsoft Clarity provides masked interaction replays. No advertising use. Your choice is saved for six months. You can change or withdraw it at any time using the “Cookies” button.

Read the audience measurement details