Skip to content

Conversation

@JordanGoasdoue
Copy link

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:

# Catalog
dev:
  api:
    labelSelector:
      app: catalog-app
      version: v1
    command: ["/bin/bash"]

# Local config
dev:
  api:
    labelSelector:
      app: my-app

Before: Local labelSelector replaces catalog entirely → loses version: v1
After: Maps are deep merged → keeps both app: my-app and version: v1

Solution:

  • Maps: deep merged recursively (local overrides on conflict)
  • Arrays: local replaces catalog entirely
  • Scalars: local overrides catalog

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?

  • Added comprehensive test coverage with 5 test cases covering real-world scenarios
  • Backward compatible: existing configs will continue to work as before
  • All existing tests pass

@netlify
Copy link

netlify bot commented Jan 15, 2026

Deploy Preview for devspace-docs canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 8cba970
🔍 Latest deploy log https://app.netlify.com/projects/devspace-docs/deploys/6968c2f6845c73000843f661

Signed-off-by: JordanGoasdoue <jordan.goasdoue@dailymotion.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant