You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the introduction of ResourceSet input providers, Flux Operator can dynamically deploy applications based on data provided by Git services e.g. Pull Requests or Git branches.
There are cases when the Kubernetes manifests are pushed from Git to a container registry and stored as OCI artifacts. One such example is a mono-repo with multiple microservices, where changes to a specific microservice, trigger a new OCI artifact push and Flux running in the cluster should deploy only the affected microservice.
In this scenario, the OCI repository tags could be used as inputs for the ResourceSet templates and thus decouple the deployment process from Git. To support this use case, a new ResourceSetInputProvider type will be introduced called OCIRepositoryTag.
Example
We assume that the Kubernetes manifests of all microservices are stored in the same OCI repository. When a commit is pushed to the Git mono-repo, the CI pipeline determines which microservice has changed and pushes the Kubernetes manifests belonging to the that microservice using a tag that matches the format app-<microservice name>.
Every time a microservice artifact is pushed to the repository, the ResourceSetInputProvider reconciler will update its digest and Flux will upgrade the microservice in the cluster using the manifests pulled from the registry by digest.
If a new microservice is added to the mono-repo, the exported inputs will include the new tag and the new microservice will be created by Flux.
If a microservice is removed from the mono-repo and its tag is deleted from the registry, Flux will uninstall the microservice from the cluster. Another option to trigger the removal of a microservice is to add its name to the excludeTag filter of the ResourceSetInputProvider.
The text was updated successfully, but these errors were encountered:
With the introduction of ResourceSet input providers, Flux Operator can dynamically deploy applications based on data provided by Git services e.g. Pull Requests or Git branches.
There are cases when the Kubernetes manifests are pushed from Git to a container registry and stored as OCI artifacts. One such example is a mono-repo with multiple microservices, where changes to a specific microservice, trigger a new OCI artifact push and Flux running in the cluster should deploy only the affected microservice.
In this scenario, the OCI repository tags could be used as inputs for the
ResourceSet
templates and thus decouple the deployment process from Git. To support this use case, a newResourceSetInputProvider
type will be introduced calledOCIRepositoryTag
.Example
We assume that the Kubernetes manifests of all microservices are stored in the same OCI repository. When a commit is pushed to the Git mono-repo, the CI pipeline determines which microservice has changed and pushes the Kubernetes manifests belonging to the that microservice using a tag that matches the format
app-<microservice name>
.Flux Operator Config
We define a
ResourceSetInputProvider
that fetches the OCI repository tags from the specified URL and filters them by a regular expression:Assuming we have three microservices in the mono-repo, the
ResourceSetInputProvider
will export the following inputs:To speed up the registry scan, a Flux
Receiver
could be called from the CI job that pushes the OCI artifacts:To deploy the microservices, we'll create a
ResourceSet
that uses the inputs from theResourceSetInputProvider
:Every time a microservice artifact is pushed to the repository, the
ResourceSetInputProvider
reconciler will update its digest and Flux will upgrade the microservice in the cluster using the manifests pulled from the registry by digest.If a new microservice is added to the mono-repo, the exported inputs will include the new tag and the new microservice will be created by Flux.
If a microservice is removed from the mono-repo and its tag is deleted from the registry, Flux will uninstall the microservice from the cluster. Another option to trigger the removal of a microservice is to add its name to the
excludeTag
filter of theResourceSetInputProvider
.The text was updated successfully, but these errors were encountered: