Deployment
The search API and the indexer run on a Kubernetes cluster at Scaleway that Flux keeps in line with infra/cluster on main. Nothing deploys by hand: a change reaches production when it is merged there. Renovate proposes most of those changes, as pull requests, and a person merges them.
From merge to production
- A
featorfixmerged tomainmakes a release. The release workflow gives the schema and both images one version, such as0.13.4, publishes the Codeberg release with its changelog and pushes the images. - Right after the images are pushed, the release workflow runs Renovate. Renovate opens, or updates, a pull request “LOL images” that moves the API’s and the indexer’s tag in
infra/clusterto the new version. - Merging that pull request deploys the release. Flux upgrades the indexer first, which builds a fresh index. Only once that index is ready does Flux upgrade the API, so the new API never serves an index built for an older schema. If the index run fails, the upgrade stops and the previous API keeps serving the previous index.
Builds of main that make no release get a timestamp tag only, and never reach the cluster.
The cluster README has the details of each step, such as the indexer’s Helm hook and its timeout.
Renovate proposes, Flux applies
Renovate decides what changes in Git: it notices a new version of an image, a chart or a package, and opens a pull request that CI then tests. Flux changes nothing in Git: it applies to the cluster whatever main says.
Infrastructure updates are never merged automatically, unlike most of our dependency updates. A new Typesense image, a chart version or a Pulumi provider is live the moment it reaches main, so someone reads the pull request first. These arrive together in an “infrastructure” pull request, our own releases in “LOL images”.
Why not Flux’s image automation
Flux’s image automation watches a registry and commits each new tag straight to Git. We have no staging environment, and it does not fit our production for two reasons:
- It commits without a pull request, so nobody reviews the release and CI does not run on the change before it goes live.
- The API and the indexer must move together, because both images carry the schema bundle. Image automation tracks each image on its own, while Renovate moves both tags in one pull request.
The nde-app chart still generates an ImageRepository and ImagePolicy for every container, so these exist in the cluster, but nothing uses them.
Running Renovate by hand
Renovate also runs every hour, and it can be started at any moment: on Codeberg, open Actions, select the Renovate workflow and choose Run workflow on main. A run takes a couple of minutes. Use it when the run after a release failed, or to skip the wait.