-
Notifications
You must be signed in to change notification settings - Fork 27
Introduce ArtifactGenerator API #255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
19 tasks
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
matheuscscp
reviewed
Sep 8, 2025
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
matheuscscp
reviewed
Sep 10, 2025
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
matheuscscp
reviewed
Sep 10, 2025
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
67c1afb
to
f23835e
Compare
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
matheuscscp
reviewed
Sep 11, 2025
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
5b1eea6
to
18206f1
Compare
matheuscscp
approved these changes
Sep 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀 🚀 🚀
Just more proof of Flux's technical excellence!
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of: fluxcd/flux2#5504
Closes: fluxcd/source-controller#854
Artifact Generators
The ArtifactGenerator is an extension of Flux APIs that allows source composition and decomposition.
It enables the generation of ExternalArtifacts from multiple sources (GitRepositories, OCIRepositories and Buckets) or the splitting of a single source into multiple artifacts.
The generated artifacts are versioned based on the hash computed from the artifact's content. This means:
Source Composition Example
The following example shows how to compose an artifact from multiple sources:
The above generator will create an ExternalArtifact named
my-app-composite
in the
apps
namespace, which contains the deployment manifests from boththe
my-backend
Git repository and themy-frontend
OCI repository,as well as a ConfigMap from the
my-configs
Bucket.The ExternalArtifact revision is computed based on the final content of the artifact,
in the format
latest@sha256:<hash>
, where<hash>
is a SHA256 checksum of the combined files.The generated ExternalArtifact can be deployed using a Flux Kustomization, for example:
Every time one of the sources is updated, a new artifact revision will be generated
with the latest content and the Flux Kustomization will automatically reconcile it.
Helm Chart Composition Example
The following example shows how to compose a Helm chart from multiple sources:
The above generator will create an ExternalArtifact named
podinfo-composite
in theapps
namespace,which contains the Helm chart from the
podinfo-chart
OCI repository with thevalues.yaml
merged withvalues-prod.yaml
from the Git repository.The generated ExternalArtifact can be deployed using a Flux HelmRelease, for example:
Source Decomposition Example
The following example shows how to decompose a source into multiple artifacts:
The above generator will create two ExternalArtifacts named
frontend
andbackend
in the
apps
namespace, each containing the respective deployment manifestsfrom the
my-monorepo
Git repository.The generated ExternalArtifacts can be deployed using Flux Kustomizations, for example:
Every time the monorepo is updated, new revisions will be generated only for the affected artifacts.
If the manifests in
deploy/frontend/
directory are modified, only thefrontend
artifact willreceive a new revision, triggering the Flux Kustomization that applies it.
While the
backend
artifact remains unchanged and its Kustomization will not reconcile.