Merge pull request #370 from fluxcd/fix-kustomize-patch-docs

Add the generic patch field to the API spec docs
This commit is contained in:
Stefan Prodan 2021-06-18 11:08:39 +03:00 committed by GitHub
commit 8a9e3995da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 5 deletions

View File

@ -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"`

View File

@ -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:

View File

@ -207,7 +207,8 @@ bool
</td>
<td>
<em>(Optional)</em>
<p>Patches (also called overlays), defined as inline YAML objects.</p>
<p>Strategic merge and JSON patches, defined as inline YAML objects,
capable of targeting objects based on kind, label and annotation selectors.</p>
</td>
</tr>
<tr>
@ -680,7 +681,8 @@ bool
</td>
<td>
<em>(Optional)</em>
<p>Patches (also called overlays), defined as inline YAML objects.</p>
<p>Strategic merge and JSON patches, defined as inline YAML objects,
capable of targeting objects based on kind, label and annotation selectors.</p>
</td>
</tr>
<tr>

View File

@ -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