Skip to content

patches should accept a patch file with multiple patches #5049

@iamnoah

Description

@iamnoah

Eschewed features

  • This issue is not requesting templating, unstuctured edits, build-time side-effects from args or env vars, or any other eschewed feature.

What would you like to have added?

patchesStrategicMerge is deprecated but provides a feature that is not currently possible with patches in that multiple strategic merge patches can be combined into a single file.

I should be able to specify that my targets are determined by the GVKNN of the strategic merge patch itself:

patches:
- path: sm-patches-for-multiple-objects.yaml
   target:
     strategicMerge: byName

The exact syntax is unimportant.

Why is this needed?

This is valuable when patch changes are correlated and future changes need to consider multiple targets. Splitting such patches across multiple files is incoherent and error prone.

Can you accomplish the motivating task without this feature, and if so, how?

My first preference would be to simply recognize this is a valuable use case and not deprecated or remove it.

What other solutions have you considered?

Helm? This ability was central to why I started using kustomize years ago, so I am frankly shocked that it is on the chopping block.

Anything else we should know?

Relates to #5040

Feature ownership

  • I am interested in contributing this feature myself! 🎉

Metadata

Metadata

Assignees

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions