Skip to content

Commit

Permalink
fix(kustomize-patches): make target required
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael Liechti <[email protected]>
  • Loading branch information
the-technat committed Jan 9, 2025
1 parent d653838 commit c2dd220
Show file tree
Hide file tree
Showing 3 changed files with 201 additions and 51 deletions.
2 changes: 1 addition & 1 deletion argocd/schema_application.go
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,7 @@ func applicationSpecSchemaV4(allOptional bool) *schema.Schema {
"target": {
Type: schema.TypeList,
Description: "Target(s) to patch",
Optional: true,
Required: true,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
Expand Down
5 changes: 4 additions & 1 deletion docs/resources/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,15 @@ Optional:
<a id="nestedblock--spec--source--kustomize--patches"></a>
### Nested Schema for `spec.source.kustomize.patches`

Required:

- `target` (Block List, Min: 1, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--source--kustomize--patches--target))

Optional:

- `options` (Map of Boolean) Additional [options](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/#name-and-kind-changes).
- `patch` (String) Inline Kustomize patch to apply.
- `path` (String) Path to a file containing the patch to apply.
- `target` (Block List, Max: 1) Target(s) to patch (see [below for nested schema](#nestedblock--spec--source--kustomize--patches--target))

<a id="nestedblock--spec--source--kustomize--patches--target"></a>
### Nested Schema for `spec.source.kustomize.patches.target`
Expand Down
Loading

0 comments on commit c2dd220

Please sign in to comment.