diff --git a/api/v1beta1/kustomization_types.go b/api/v1beta1/kustomization_types.go index 8d6a2e8..2419c13 100644 --- a/api/v1beta1/kustomization_types.go +++ b/api/v1beta1/kustomization_types.go @@ -83,7 +83,8 @@ type KustomizationSpec struct { // +optional HealthChecks []meta.NamespacedObjectKindReference `json:"healthChecks,omitempty"` - // Patches (also called overlays), defined as inline YAML objects. + // Strategic merge and JSON patches, defined as inline YAML objects, + // capable of targeting objects based on kind, label and annotation selectors. // +optional Patches []kustomize.Patch `json:"patches,omitempty"` diff --git a/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml b/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml index 2e9147c..9ae59c7 100644 --- a/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml +++ b/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml @@ -143,7 +143,7 @@ spec: type: object type: object patches: - description: Patches (also called overlays), defined as inline YAML objects. + description: Strategic merge and JSON patches, defined as inline YAML objects, capable of targeting objects based on kind, label and annotation selectors. items: description: Patch contains either a StrategicMerge or a JSON6902 patch, either a file or inline, and the target the patch should be applied to. properties: diff --git a/docs/api/kustomize.md b/docs/api/kustomize.md index 5ccdfec..544b52c 100644 --- a/docs/api/kustomize.md +++ b/docs/api/kustomize.md @@ -207,7 +207,8 @@ bool (Optional) -

Patches (also called overlays), defined as inline YAML objects.

+

Strategic merge and JSON patches, defined as inline YAML objects, +capable of targeting objects based on kind, label and annotation selectors.

@@ -680,7 +681,8 @@ bool (Optional) -

Patches (also called overlays), defined as inline YAML objects.

+

Strategic merge and JSON patches, defined as inline YAML objects, +capable of targeting objects based on kind, label and annotation selectors.

diff --git a/docs/spec/v1beta1/kustomization.md b/docs/spec/v1beta1/kustomization.md index 7b00743..e16fa86 100644 --- a/docs/spec/v1beta1/kustomization.md +++ b/docs/spec/v1beta1/kustomization.md @@ -55,6 +55,11 @@ type KustomizationSpec struct { // +optional HealthChecks []meta.NamespacedObjectKindReference `json:"healthChecks,omitempty"` + // Strategic merge and JSON patches, defined as inline YAML objects, + // capable of targeting objects based on kind, label and annotation selectors. + // +optional + Patches []kustomize.Patch `json:"patches,omitempty"` + // Strategic merge patches, defined as inline YAML objects. // +optional PatchesStrategicMerge []apiextensionsv1.JSON `json:"patchesStrategicMerge,omitempty"` @@ -630,7 +635,7 @@ To add [Kustomize `patches` entries](https://kubectl.docs.kubernetes.io/referenc to the configuration, and patch resources using either a [strategic merge](https://kubectl.docs.kubernetes.io/references/kustomize/glossary#patchstrategicmerge) patch or a [JSON](https://kubectl.docs.kubernetes.io/references/kustomize/glossary#patchjson6902) patch, `spec.patches` items must contain a `target` selector and a `patch` document. -The patch can target a single resource or multiple resources +The patch can target a single resource or multiple resources: ```yaml apiVersion: kustomize.toolkit.fluxcd.io/v1beta1