This guide shows you how Timoni can be used together with
Flux to create a GitOps delivery pipeline
for module instances.
Timoni ControllerNote that currently Timoni can be used with Flux as a templating engine for Kubernetes manifests.
Features like app lifecycle management, bundling, runtime values injection and multi-cluster
deployments are not available when using Timoni as a templating engine. For Timoni to fully embrace GitOps,
a Kubernetes controller will be implemented when Timoni’s CUE APIs reach a more stable form.
Build and Push workflow
We’ll build a module instance with Timoni, and we’ll push
the resulting Kubernetes manifests to a container registry with Flux CLI.
You can also use a Timoni bundle to generate the Kubernetes manifests:
The above commands could be run in CI for the Git repository
that contains the values files. Committing a change to the values, will
result in a new artifact pushed to the registry. From there, Flux running
in Kubernetes, will pick up the latest changes and deploy them on the cluster.
Continuous Delivery workflow
In the Git repository where Flux was bootstrapped, we’ll configure the reconciliation
of the Kubernetes resources pushed to the container registry.
Flux sync moduleYou can generate the configuration for Flux to reconcile the OCI artifacts
using the flux-oci-sync module.
Based on the above configuration, Flux will look for changes in the container registry every minute.
When it finds a new digest of the OCI artifact, Flux will automatically reconcile the changes on the cluster.
To find out more about Flux OCI support please see the Flux OCI docs.