Skip to content

Configuration Update and Merge Feature #19

@ritwik-g

Description

@ritwik-g

Problem Statement

Currently, when chart owners update their configuration schema (adding new paths, modifying metadata, or removing obsolete paths), users face several challenges:

  1. Manual identification and application of changes between configuration versions
  2. Risk of missing new required configuration paths
  3. Potential loss of existing values when updating to a new configuration
  4. Difficulty resolving conflicts between user customizations and chart owner updates

This creates friction in the update process and increases the risk of configuration errors.

Proposed Solution

Implement a configuration update and merge feature that allows users to incorporate changes from a new configuration file while preserving their existing values and deployments:

  1. Add a new update-config command to the CLI:

    @app.command()
    def update_config(
        source_file: str = typer.Argument(..., help="Path to the updated configuration file from chart owner"),
        merge_strategy: str = typer.Option(
            "smart", 
            "--strategy", 
            "-s", 
            help="Merge strategy: 'smart' (preserve user values), 'theirs' (prefer new config), or 'ours' (prefer existing config)"
        ),
        report_only: bool = typer.Option(
            False, 
            "--report-only", 
            "-r", 
            help="Only report differences without making changes"
        )
    ):
        """Update the configuration with a new version from the chart owner."""
  2. Implement configuration comparison to identify:

    • Added configuration paths
    • Removed configuration paths
    • Modified metadata (description, required, sensitive flags)
    • Potential conflicts
  3. Provide multiple merge strategies:

    • "Smart" (default): Preserve user values while adopting new metadata and paths
    • "Theirs": Prefer the new configuration but keep existing values where possible
    • "Ours": Prefer the existing configuration but add new paths
  4. Validate the merged configuration and report required actions

Alternative Solutions

  1. Manual Updates: Continue with the current approach of manual updates, but provide better documentation on how to merge configurations.
  2. Schema Versioning: Implement a more formal schema versioning system with migration scripts.
  3. Configuration Diffing Tool: Create a tool that only shows differences without performing merges.

Additional Context

An Architecture Decision Record (ADR-010: Configuration Update and Merge) has been created to document this feature and its implementation details.

This feature will significantly improve the user experience when updating configurations, reduce the risk of configuration errors, and make it easier to adopt new chart versions.

Requirements

  • This feature aligns with the project's scope and goals
  • I've checked that this feature doesn't already exist
  • I've searched for existing feature requests

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions