Deployment
Booking is deployed to Kubernetes via Helm (helm/booking). It replaces the Java booking-service; the migration boundary is the database schema, which starts from the Java service's schema so existing production data is adopted cleanly and then evolves forward via migrations (see ADR-0004).
Prerequisites
- Kubernetes with Helm 3.
- MariaDB (or MySQL-compatible) - either an existing
bookingdbfrombooking-service, or a fresh instance; the initial migration creates the schema idempotently either way (see ADR-0004). - App Suite middleware reachable at the URL configured via
appSuiteApi- Booking calls/user/me,/capabilities,/folders, and/chronosagainst it. - An SMTP relay for Appointment Booking (
mail.host/mail.frominconfig.yaml, see Configuration) - booking confirmations, manage links, and the iMIP calendar invitations all go over mail (ADR-0011); booking requests are refused with a 503 while it is unconfigured. Polls work without it. - Middleware iMIP processing (to be verified) - bookings land in the owner's App Suite Calendar as standard iMIP invitations over mail (ADR-0010), so the middleware's inbound iMIP auto-processing determines whether the event appears without the owner opening the invitation mail. The candidate setting is
com.openexchange.calendar.autoProcessIMip*- the exact key and its default are not yet verified against a full stack (tracked as spike S1); until confirmed, assume owners may need to open the invitation mail in App Suite Mail for the event to materialize. The booking record, not the calendar, stays authoritative either way.
Image
Multi-stage build on registry.gitlab.com/openxchange/base-images/wolfi/node-caged (see Dockerfile): the build stage runs pnpm ui:build to produce the two frontends, then strips dev dependencies down to a production install before copying into the runtime stage. There is no backend build step - the runtime image runs node src/index.ts directly (Node type stripping, see ADR-0002). The container exposes 8080 (API) and 9090 (health/metrics).
Install
helm install booking ./helm/booking \
-f booking-values.yaml \
-n production --create-namespaceSee Configuration for the full values reference. At minimum, set image.tag, database.*, and appSuiteApi.
Verify:
kubectl -n production get pods -l app.kubernetes.io/name=booking
kubectl -n production logs -l app.kubernetes.io/name=booking --tail=50Database migrations
Migrations run as a Kubernetes Job (helm/booking/templates/migrate-job.yaml), not a Helm hook - see ADR-0009 for why. Job.spec.template is immutable, so every rollout needs a fresh Job, and the chart gets there two ways:
- Rotating name (
migration.rotate: true, the default) - the Job name carries a sha256-truncated suffix derived frommigration.jobId, falling back to.Release.Revision, so ahelm upgradecreates a new Job by itself. Finished Jobs are cleaned up aftermigration.ttlSecondsAfterFinished(60s). Nothing has to be wired for plain helm, helmfile or stack-chart consumers; CI setsjobIdto the pipeline job id so a retry re-runs the migration against an ephemeral database. - Stable name (
migration.rotate: false) - for ArgoCD-managed deployments, which this repo'sargocd/manifests use.helm templatepinsRelease.Revisionto1, so the suffix would never rotate between syncs, and the TTL cleanup would leave the tracked JobMissing/OutOfSync. The Job keeps its name and is delete+recreated per sync instead (argocd.argoproj.io/sync-options: Replace=true,Force=true).
Migrations are idempotent (only pending ones run), so re-running per sync is safe.
The running application also refuses to start against a database with pending migrations (a read-only startup check from @open-xchange/fastify-sdk) - the Job is what actually applies them; the app-level check is a safety net, not the mechanism.
Rollout / switchover from booking-service
Because the initial schema mirrors the Java service's (migrations use CREATE TABLE IF NOT EXISTS against the Liquibase-created tables), the first cutover from the Java service to Booking is low-risk and can be either:
- Adopt the live
bookingdbin place - point Booking'sdatabase.*values at the existing database; the initial migration run is a no-op against existing tables and only creates what is genuinely missing. - Dump/import - if adopting in place isn't operationally desirable (e.g. moving to a different MariaDB instance), a standard dump/restore of
bookingdbbefore pointing Booking at the new instance works identically.
The schema is compatible at the point of cutover to keep that migration cheap; it is not frozen - later migrations may evolve it beyond the Java service's shape (see ADR-0004).
Upgrade and rollback
helm upgrade booking ./helm/booking -f booking-values.yaml -n production
kubectl -n production rollout status deployment/booking
helm history booking -n production
helm rollback booking -n production # previous revisionThe Deployment's pod template carries an io.ox.commit-sha annotation (global.commitSha) purely to force a rollout when the image tag itself is stable (e.g. main) - changing the annotation triggers a new ReplicaSet even without a values change. checksum/config similarly forces a rollout when bookingConfig changes, though in most cases the hot-reload picks up the change without a restart at all (see Configuration).
Scaling and rollouts
Booking runs as one shared deployment sized by load: a single pod, or three for redundancy, scaled by hand (replicaCount) or by a HorizontalPodAutoscaler as traffic grows. Replicas need no coordination with each other; the cleanup job in particular is safe to run on all of them at once (see Monitoring).
Every configuration change rolls the pods (checksum/config and its siblings), so a rollout must never take the service down. The chart sets an explicit rolling-update strategy of maxUnavailable: 0 and maxSurge: 1: the new pod starts and passes its readiness probe before an old one stops, which holds at a single replica too. While a migration is pending, the new pod does not become ready and the old pods keep serving until the migrate Job completes. Helm merges an override of strategy into the default, so switching to type: Recreate needs rollingUpdate: null alongside it.
hpa:
create: true
minReplicas: 1
maxReplicas: 3
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
pdb:
create: true
maxUnavailable: 1hparenders anautoscaling/v2HorizontalPodAutoscaler with a CPU target, a memory target, extrametricsentries (custom or external metrics, verbatim), or any mix of them; creating it with none fails the render.behavioris rendered verbatim as the HPA's scale-up and scale-down policies. While it is on, the Deployment carries noreplicasfield, so a sync never resets the count the HPA chose, andreplicaCountis ignored. Utilization is measured againstresources.requests, so a target needs a request (the chart sets both).pdblimits voluntary evictions such as node drains and cluster-autoscaler consolidation. It does not govern rollouts (that isstrategy), HPA scale-down or node failures. SetminAvailableormaxUnavailable(a number or a percentage);minAvailabletakes precedence when both are set, and enabling it with neither fails the render.maxUnavailable: 1, the chart's default when the budget is created, keeps every other pod serving through a drain and follows the replica count as it changes. On a single replica it lets the drain evict the only pod, whileminAvailable: 1would block the drain until someone scales up, so protecting a drain needs at least two replicas.unhealthyPodEvictionPolicy: AlwaysAllow(Kubernetes 1.31+) lets a drain evict pods that never became ready instead of waiting on them.
Both are off by default, and replicaCount stays at 2. The keys follow the same values contract as the core-mw and core-ui charts, so one umbrella values file configures them all the same way.
App Suite UI plugin discovery
The ui-plugin frontend is served by Booking itself at /booking/plugin/ (static: true in createApp(), gated on the built ui-plugin/dist existing). ui-service discovers it via the Service label appsuite.ox.io/ui-provider: manifest and annotation appsuite.ox.io/ui-base-path: /booking/plugin (uiProvider.enabled/uiProvider.basePath in the chart), then merges its meta.json/manifest.json. No separate nginx or static-hosting container is needed.
Health checks
Provided by @open-xchange/fastify-sdk on port 9090 - see Monitoring for the full endpoint and metrics reference. The Helm chart's livenessProbe/readinessProbe defaults point at /live and /ready.
Troubleshooting
Pod in CrashLoopBackOff shortly after a migration/rollout. Expected transiently: the migrate Job and the Deployment apply concurrently (see ADR-0009), so new Pods can fail their pending-migrations startup check until the Job completes. Old Pods keep serving traffic during the rolling update. If it persists past the Job completing, check the Job's logs directly (kubectl logs job/<name>).
Readiness probe failing. Usually the database is unreachable, or a migration is genuinely still pending. Check DB_BOOKING_* env values against the target database and confirm the migrate Job actually completed (kubectl get jobs).
App Suite calls failing (503, SERVICE_NOT_AVAILABLE). APP_SUITE_API is unreachable or timing out (5s timeout, see Development → security). Verify connectivity from inside the cluster, not just from your workstation.
UI plugin not appearing in App Suite. Confirm the Service carries the ui-provider label/annotation pair and that ui-plugin/dist actually exists in the deployed image (it's built at image-build time, not at runtime).

