ApplicationSet templatePatch
list merge with template
#16800
Labels
bug
Something isn't working
component:application-sets
Bulk application management related
version:EOL
Latest confirmed affected version has reached EOL
Checklist:
argocd version
.Describe the bug
The new ApplicationSet
templatePatch
introduced in #14893 does not merge lists fromtemplate
. It will override a list field entirely. An example is when usingsources
to list multiple sources. Consider the following example which produces the errorTo Reproduce
Putting all sources in
templatePatch
does work, but is not ideal as it could be a very large string that doesn't work as nicely in IDEs as an object would. Here is the equivalent example that works:Expected behavior
The
sources
in thetemplatePatch
will be deep merged with thesources
intemplate
, usingrepoURL
or perhapsref
as a merge key.That might not be feasible because while
repoURL
is required, it is not necessarily unique.ref
is unique but not required. Perhapsref
could be required in the case where a source merge is desired.This behaviour would be similar to how a Kustomize strategic merge patch patches Container fields within a Pod spec, using the Container
name
as a unique merge key.If not then at least additional sources in
templatePatch
could be appended to the existing list of sources intemplate
?Version
The text was updated successfully, but these errors were encountered: