Preview apps
Every merge request gets an automatic ArgoCD preview environment, deployed through the shared openxchange/ci/argocd CI component; the persistent booking-main environment is instead owned by a declarative ApplicationSet in argocd/, with CI reduced to an image rollout (see ADR-0008).
What gets deployed
The zero-input mr-preview component deploys two envsubst-templated ArgoCD Applications under .gitlab/argocd/ (see ADR-0008):
preview-infra.yaml→ thedeploy preview infrajob. A single-source app overhelm/booking-preview— ephemeral infra: the owned Namespace, MariaDB (operator CRD), redis, a Garage S3 companion for the ui-middleware asset store, the shared App Suite middlewareExternalName, and an IstioVirtualServicerouting/apiand/ui/v1into the sharedappsuite-mainstack while keeping/booking/*in-namespace. The whole ephemeral asset-store state is rolled on every commit (rolloutId=$CI_COMMIT_SHA): the Garage pod (EmptyDir) and the in-memory redis carrying the ui-middleware's version bookkeeping; the garage-operator re-ensures bucket and key on the fresh instance by itself (the cluster runs a patched operator image for this until the fix lands upstream). Each commit therefore deploys against a fresh, consistent store — Garage degrades once bucket metadata accumulates, and deleting versions only trades them for tombstones that are GCed after 24h, so MR previews keep no version history at all. The state must die together: wiping only Garage leaves redis claiming a UI version is uploaded while the store is empty, and the updater then serves 404s. Long-lived deployments from this chart (booking-main) don't setrolloutId: they keep the stable pods and prune superseded versions with theui-service-version-gcCronJob instead, which is good enough at a handful of deploys a day without e2e racing the rollout.preview-app.yaml→ thedeploy previewjob. A multi-source app over:helm/booking— Booking itself,image.tag = $CI_COMMIT_REF_SLUG(a mutable per-branch tag;pullPolicy: Always+ theio.ox.commit-shaannotation fromglobal.commitSharoll the pod on each commit). Its migration Job retries against the MariaDB the infra app brings up (the Job'sbackoffLimitcovers the DB's provisioning window, so no cross-app ordering is needed).core-ui-middleware— the in-namespace App Suite shell that discovers Booking's UI plugin.
There is no full App Suite deployment per preview — middleware and core-ui are shared, reached via ExternalName/Istio routing; only Booking-specific infrastructure is per-namespace.
Documentation at /booking/docs
This documentation is deployed alongside every preview, so a branch's docs can be read at https://<preview host>/booking/docs. It is a separate image, not part of the service: the service has no business serving a static site, and keeping them apart means docs changes never touch the app image.
docs/Dockerfilebuilds the VuePress site and copies it into the org'swolfi/nginxbase image under/usr/share/nginx/html/docs. That base serves/usr/share/nginx/htmlon port 8080, so the site needs no nginx config of its own. The build context is the repo root, because the build needs the pnpm workspace files and the markdown sources.- The
build docs imageCI job pushes it to$CI_REGISTRY_IMAGE/docswith the branch slug as tag, next to the app and e2e images. helm/booking-previewdeploys it (templates/docs.yaml) and routes it (templates/virtualservice.yaml). The image reference is injected by the ArgoCD manifests like the third-party images below, since the tag differs per environment: the branch slug for previews,mainforbooking-main.
The site is built with the public base /booking/docs, while the image serves it internally under /docs, so the route rewrites the prefix on the way in. The base has to be the browser-visible prefix: a static site emits absolute asset URLs, and an Istio rewrite only changes what the upstream sees. For the same reason the bare /booking/docs is answered with a redirect to /booking/docs/ rather than being rewritten — nginx would otherwise reply to the directory request with a redirect to its internal /docs/, which is not routed.
Set docs.enabled: false to leave it out of a deployment.
Where third-party image digests live
helm/booking-preview pins no third-party image itself. MariaDB, redis, mailpit and the Garage version-GC image are all injected as Helm parameters by the two ArgoCD manifests (argocd/application.yaml for booking-main, .gitlab/argocd/preview-infra.yaml for MR previews), each carrying a # renovate: comment picked up by the custom manager in renovate.json. The chart's values leave them empty and the templates fail rendering with a clear message if a deployment forgets one. Bumping a digest therefore touches a manifest, not chart content, so it needs no Chart.yaml version bump and can automerge past the lint helm chart gate. Add new third-party images the same way.
Getting a preview
- Open a merge request — the
deploy previewjob runs automatically on every MR. deploy preview infrabrings up the infra app anddeploy previewcreates, syncs and blocks onargocd app wait --sync --health, so a green deploy job means the whole live stack (infra + Booking + core-ui-middleware) is running this commit.- The preview becomes available at
https://booking-<slug>.$KUBE_INGRESS_BASE_DOMAIN(e.g.https://booking-<slug>.dev.oxui.de), in namespacebooking-<slug>. The component derives<slug>from$CI_COMMIT_REF_SLUG. - The
e2e tests - codeceptjsjob runs against the preview URL.
Closing or merging the MR runs the teardown preview job (the environment's on_stop), which argocd app delete --cascades the Application; auto-stop-in (default 1 week) tears an idle preview down on its own. The preview chart templates the Namespace resource itself so ArgoCD owns and cascade-deletes it.
Main environment
booking-main is declarative, not driven by a CI deploy job. The ApplicationSet in argocd/application.yaml owns it (selfHeal, prune) and renders the same three sources (Booking + infra
- core-ui-middleware) into namespace
booking-mainathttps://booking-main.dev.oxui.de. On eachmainpipeline therolloutCI job bumpsglobal.commitShaon the Booking source (source-position: "1") and waits for synced+healthy, so the freshly built:mainimage rolls out — CI never creates or deletes the app. It runs the same ephemeral in-namespace MariaDB/Garage as the previews (no durable storage; see ADR-0008).
One-time cluster / CI setup
- Group CI/CD variables:
ARGOCD_SERVERandARGOCD_AUTH_TOKEN(the component drives the ArgoCD CLI), andKUBE_INGRESS_BASE_DOMAIN(with wildcard DNS) for the preview URLs. - An ArgoCD
AppProject(defaultshared-deployments) that permits this repo and the destination cluster/namespaces, and covers the registry.open-xchange.com OCI chart + image credentials the previews use. - The consuming repo must be readable by ArgoCD (registered or group-covered) — ArgoCD pulls the chart/manifests from Git.
- Cluster prerequisites: the MariaDB operator (
k8s.mariadb.com) and the Garage operator (garage.rajsingh.info) must be installed — both are already required by other previews on this cluster (e2e-environment, teams). - For
booking-main: no manual step. The cluster'sscm-discoveryApplicationSetscans theopenxchange/appsuitegroup and applies theargocd/directory of any repo that carries theargocd(orpreview-apps) GitLab project topic — booking already has theargocdtopic, so onceargocd/is onmainit creates abootstrap-bookingApplication that syncsargocd/application.yaml, yielding thebooking-mainApplicationSet. MR previews don't rely on this — themr-previewcomponent applies their Applications imperatively.
Migrating from the old imperative booking-main
Before this layout, main deployed booking-main imperatively via a deploy main CI job, leaving a standalone booking-main Application (no ownerReferences). The new ApplicationSet generates an Application of the same name, so the old one must be removed once for the set to own it:
# zero-downtime: orphan the workloads, let scm-discovery's ApplicationSet re-adopt
kubectl delete application booking-main -n argocd --cascade=orphan
# or simply redeploy from scratch (booking-main has no durable data):
kubectl delete application booking-main -n argocdDo this around the merge that lands argocd/ on main. It is a one-time step; afterwards booking-main is fully declarative.
Verifying a fresh setup
- The
core-ui-middlewareService name referenced by theVirtualService(<release>-core-ui-middleware, derived from the release name) matches what's deployed. - The
open-xchange-registry-credentialspull secret exists in the preview namespace forregistry.open-xchange.comimages. - The MariaDB and Garage operators are healthy in the cluster before expecting a preview to come up clean.
Related
- Deployment — the production Helm chart these preview values extend
- ADR-0008 — the CI component + declarative
booking-main, and the mutable branch-slug image tag - ADR-0009 — why
migration.jobIdmatters especially for ephemeral preview databases (they lose schema on Pod restart, so a pipeline retry must re-run the migration)

