@@ -30,7 +30,7 @@ apiVersion: source.extensions.fluxcd.io/v1beta1
3030kind : ArtifactGenerator
3131metadata :
3232 name : my-app
33- namespace : flux-system
33+ namespace : apps
3434spec :
3535 sources :
3636 - alias : backend
@@ -56,9 +56,9 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1
5656kind : Kustomization
5757metadata :
5858 name : my-app
59- namespace : flux-system
59+ namespace : apps
6060spec :
61- interval : 10m
61+ interval : 15m
6262 sourceRef :
6363 kind : ExternalArtifact
6464 name : my-app-composite
@@ -75,26 +75,27 @@ apiVersion: source.extensions.fluxcd.io/v1beta1
7575kind : ArtifactGenerator
7676metadata :
7777 name : platform-services
78- namespace : flux-system
78+ namespace : platform
7979spec :
8080 sources :
8181 - alias : monorepo
8282 kind : GitRepository
8383 name : platform-monorepo
8484 artifacts :
85- - name : policy-config
85+ - name : policies
8686 copy :
8787 - from : " @monorepo/platform/policy/**"
8888 to : " @artifact/"
8989 - name : auth-service
9090 copy :
9191 - from : " @monorepo/services/auth/deploy/**"
9292 to : " @artifact/"
93+ exclude : ["*.md"]
9394 - name : api-gateway
9495 copy :
9596 - from : " @monorepo/services/gateway/deploy/**"
9697 to : " @artifact/"
97- exclude : ["**/charts/**"]
98+ exclude : ["*.md", "* */charts/**"]
9899` ` `
99100
100101Each service gets its own ExternalArtifact with an independent revision.
@@ -116,43 +117,56 @@ spec:
116117 - alias: chart
117118 kind: OCIRepository
118119 name: podinfo-chart
119- namespace: apps
120120 - alias: repo
121121 kind: GitRepository
122122 name: podinfo-values
123- namespace: apps
124123 artifacts:
125124 - name: podinfo-composite
126125 originRevision: "@chart" # Track chart version
127126 copy:
128127 - from: "@chart/"
129128 to: "@artifact/"
129+ - from: "@repo/charts/podinfo/values.yaml"
130+ to: "@artifact/podinfo/values.yaml"
131+ strategy: Overwrite
130132 - from: "@repo/charts/podinfo/values-prod.yaml"
131- to: "@artifact/podinfo/values.yaml" # Override default values
133+ to: "@artifact/podinfo/values.yaml"
134+ strategy: Merge
135+ ---
136+ apiVersion: helm.toolkit.fluxcd.io/v2
137+ kind: HelmRelease
138+ metadata:
139+ name: podinfo
140+ namespace: apps
141+ spec:
142+ interval: 15m
143+ releaseName: podinfo
144+ chartRef:
145+ kind: ExternalArtifact
146+ name: podinfo-composite
132147` ` `
133148
134149# # Key Features
135150
136151# ## Content-based Revision Tracking
137152
138- The generated artifacts are versioned as `latest@sha256:< hash>` where the hash
139- is computed from the artifact's content. This means :
153+ The generated artifacts are versioned based on the hash computed from the artifact's content.
154+ This means :
140155
141156- ✅ Identical content = same revision (no unnecessary reconciliations)
142- - ✅ Any change = new revision (guaranteed updates)
157+ - ✅ Any change to included content = new revision (guaranteed updates)
143158- ✅ Automatic change detection across all source types
144159
145- The controller attaches the origin source revision (e.g. Git commit SHA)
146- to the generated artifact metadata for traceability and Flux commit status updates.
147-
148160# ## Flexible Copy Operations
149161
150- Copy operations support glob patterns and exclusions :
162+ Copy operations support glob patterns, exclusions and YAML merge :
151163
152164- ` @source/file.yaml` → `@artifact/dest/` - Copy file into directory
153165- ` @source/dir/` → `@artifact/dest/` - Copy directory as subdirectory
154166- ` @source/dir/**` → `@artifact/dest/` - Copy directory contents
155167- ` @source/file.yaml` → `@artifact/existing.yaml` - Later copy overwrites earlier ones
168+ - `exclude : ["*.md"]` - Exclude matching files from copy
169+ - `strategy : Merge` - Deep merge YAML files instead of overwriting
156170
157171# # Use Cases
158172
@@ -164,7 +178,7 @@ Copy operations support glob patterns and exclusions:
164178- **Vendor Chart Customization** - Combine upstream Helm charts from OCI registries with
165179 your organization's custom values and configuration overrides stored in Git.
166180- **Selective Deployment** - Deploy only changed components from large repositories
167- by decomposing them into focused artifacts.
181+ by decomposing them into dedicated artifacts.
168182
169183# # API Reference
170184
@@ -173,4 +187,4 @@ Copy operations support glob patterns and exclusions:
173187# # Contributing
174188
175189This project is Apache 2.0 licensed and accepts contributions via GitHub pull requests.
176- To start contributing please see the [development guide](CONTRIBUTING.md).
190+ To start contributing please see the [contrib guide](CONTRIBUTING.md).
0 commit comments