feat: deep merge imports to combine local and catalog configs #3103
+318
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What issue type does this pull request address?
/kind feature
What does this pull request do? Which issues does it resolve?
Implements recursive deep merge for config imports to allow projects to inherit shared catalog configs while only overriding specific values.
Problem:
When importing a config (e.g., from a git catalog), the current implementation only does a shallow merge at the first level. If both the imported config and the local config define the same section (like
dev.api), nested maps are completely replaced instead of being merged.Example:
Before: Local
labelSelectorreplaces catalog entirely → losesversion: v1After: Maps are deep merged → keeps both
app: my-appandversion: v1Solution:
This enables the common use case where organizations maintain a shared catalog in git, and projects only need to override specific values (like app name) while inheriting everything else (ports, sync config, commands, etc.).
Please provide a short message that should be published in the DevSpace release notes
Imports now use deep merge for map fields, allowing projects to inherit shared catalog configs while only overriding specific nested values. Arrays and scalars continue to be replaced entirely by local config.
What else do we need to know?