File tree 7 files changed +68
-3
lines changed
7 files changed +68
-3
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,10 @@ type KustomizationSpec struct {
153
153
// +kubebuilder:validation:Enum=none;client;server
154
154
// +optional
155
155
Validation string `json:"validation,omitempty"`
156
+
157
+ // Components specifies relative paths to specifications of other Components
158
+ // +optional
159
+ Components []string `json:"components,omitempty"`
156
160
}
157
161
158
162
// Decryption defines how decryption is handled for Kubernetes manifests.
Original file line number Diff line number Diff line change @@ -585,6 +585,12 @@ spec:
585
585
description : KustomizationSpec defines the configuration to calculate
586
586
the desired state from a Source using Kustomize.
587
587
properties :
588
+ components :
589
+ description : Components specifies relative paths to specifications
590
+ of other Components
591
+ items :
592
+ type : string
593
+ type : array
588
594
decryption :
589
595
description : Decrypt Kubernetes secrets before applying them on the
590
596
cluster.
Original file line number Diff line number Diff line change @@ -367,6 +367,18 @@ string
367
367
<p >Deprecated: Not used in v1beta2.</p >
368
368
</td >
369
369
</tr >
370
+ <tr >
371
+ <td >
372
+ <code >components</code ><br >
373
+ <em >
374
+ [ ] string
375
+ </em >
376
+ </td >
377
+ <td >
378
+ <em >(Optional)</em >
379
+ <p >Components specifies relative paths to specifications of other Components</p >
380
+ </td >
381
+ </tr >
370
382
</table >
371
383
</td >
372
384
</tr >
@@ -816,6 +828,18 @@ string
816
828
<p >Deprecated: Not used in v1beta2.</p >
817
829
</td >
818
830
</tr >
831
+ <tr >
832
+ <td >
833
+ <code >components</code ><br >
834
+ <em >
835
+ [ ] string
836
+ </em >
837
+ </td >
838
+ <td >
839
+ <em >(Optional)</em >
840
+ <p >Components specifies relative paths to specifications of other Components</p >
841
+ </td >
842
+ </tr >
819
843
</tbody >
820
844
</table >
821
845
</div >
Original file line number Diff line number Diff line change @@ -556,6 +556,7 @@ offering support for the following Kustomize directives:
556
556
- [namespace](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/namespace/)
557
557
- [patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/)
558
558
- [images](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/images/)
559
+ - [components](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/components/)
559
560
560
561
# ## Target namespace
561
562
@@ -654,6 +655,31 @@ spec:
654
655
digest: sha256:24a0c4b4a4c0eb97a1aabb8e29f18e917d05abfe1b7a7c07857230879ce7d3d3
655
656
` ` `
656
657
658
+ # ## Components
659
+
660
+ To add [Kustomize `components` entries](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/components/)
661
+ to the configuration, and use reusable pieces of configuration logic that can
662
+ be included from multiple overlays, `spec.components` can be defined :
663
+
664
+ ` ` ` yaml
665
+ apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
666
+ kind: Kustomization
667
+ metadata:
668
+ name: podinfo
669
+ namespace: flux-system
670
+ spec:
671
+ # ...omitted for brevity
672
+ components:
673
+ - ingress
674
+ - tls
675
+ ` ` `
676
+
677
+ **Note:** The component paths must be local and relative.
678
+
679
+ **Warning:** Components are a alpha feature in Kustomize and are therefore
680
+ considered experimental in Flux. No guarantees are provided and the feature may
681
+ be modified in backwards incompatible ways or removed without warning.
682
+
657
683
# # Variable substitution
658
684
659
685
With `spec.postBuild.substitute` you can provide a map of key/value pairs holding the
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ require (
25
25
github.com/fluxcd/pkg/apis/kustomize v0.7.0
26
26
github.com/fluxcd/pkg/apis/meta v0.18.0
27
27
github.com/fluxcd/pkg/http/fetch v0.3.0
28
- github.com/fluxcd/pkg/kustomize v0.10 .0
28
+ github.com/fluxcd/pkg/kustomize v0.11 .0
29
29
github.com/fluxcd/pkg/runtime v0.24.0
30
30
github.com/fluxcd/pkg/ssa v0.22.0
31
31
github.com/fluxcd/pkg/tar v0.2.0
Original file line number Diff line number Diff line change @@ -236,8 +236,8 @@ github.com/fluxcd/pkg/apis/meta v0.18.0 h1:s0LeulWcQ4DxVX6805vgDTxlA6bAYk+Lq1QHS
236
236
github.com/fluxcd/pkg/apis/meta v0.18.0 /go.mod h1:pYvXRFi1UKNNrGR34jw3uqOnMXw9X6dTkML8j5Z7tis =
237
237
github.com/fluxcd/pkg/http/fetch v0.3.0 h1:/mLj0IzTx+GhR09etzMJsBoNQ0qeOx9cSdeUgRB+oqM =
238
238
github.com/fluxcd/pkg/http/fetch v0.3.0 /go.mod h1:dHTDYIeL0ZAQ9mHM6ZS4VProxho+Atm73MHJ55yj0Sg =
239
- github.com/fluxcd/pkg/kustomize v0.10 .0 h1:EG5MbYrLtxeCiZxeFUgvyBhFZaXnKfeqqpg7O+J7o3s =
240
- github.com/fluxcd/pkg/kustomize v0.10 .0 /go.mod h1:awHID4OKe2/WAfTFg4u0fURXZPUkrIslSZNSPX9MEFQ =
239
+ github.com/fluxcd/pkg/kustomize v0.11 .0 h1:zseS9LRUuzhP/7KamccmsOgYpJAdhqtsf+2wN/CHF3I =
240
+ github.com/fluxcd/pkg/kustomize v0.11 .0 /go.mod h1:awHID4OKe2/WAfTFg4u0fURXZPUkrIslSZNSPX9MEFQ =
241
241
github.com/fluxcd/pkg/runtime v0.24.0 h1:rQmm5Xq8K7f8xcPj1oNOInM1x4YwmgTucZJOP51Xmr4 =
242
242
github.com/fluxcd/pkg/runtime v0.24.0 /go.mod h1:I2T+HWVNzX0cxm9TgH+SVNHTwqlmEDiSke43JXsq9iY =
243
243
github.com/fluxcd/pkg/ssa v0.22.0 h1:HvJTuiYLZMxCjin7bAqBgnc2RjSqEfYrMbV5yINoM64 =
You can’t perform that action at this time.
0 commit comments