Skip to content

Support for custom configuration file paths #17

@ritwik-g

Description

@ritwik-g

Problem Statement

Currently, the Helm Values Manager uses hardcoded file paths for its configuration and lock files (helm-values.json and .helm-values.lock). This limits flexibility in several ways:

  1. Users cannot manage multiple configurations in the same directory
  2. Organizations may have specific naming conventions that conflict with our hardcoded names
  3. Integration with existing systems that might have their own file organization is difficult
  4. Configuration files must be in the current working directory

Proposed Solution

Enhance the Helm Values Manager to support custom configuration file paths by:

  1. Adding a --config-file option to all commands:

    config_file: str = typer.Option(
        "helm-values.json", 
        "--config-file", 
        "-c", 
        help="Path to the configuration file"
    )
  2. Updating the BaseCommand class to accept a config file path

  3. Generating the lock file name based on the config file path

  4. Propagating the config file path to all command instances

The implementation should be backward compatible, using the current hardcoded paths as defaults.

Alternative Solutions

  1. Environment Variables: Use environment variables to specify the configuration file path, but this is less user-friendly for CLI tools.
  2. Configuration Profiles: Implement a profile system where users can switch between different configurations, but this adds more complexity than needed.
  3. Configuration Directory: Use a dedicated directory for all configurations, but this constrains where files can be placed.

Additional Context

An Architecture Decision Record (ADR-009: Custom Configuration File Paths) has been created to document this feature and its implementation details. The feature will increase flexibility, allow for custom naming, improve integration with existing systems, and provide location freedom for configuration files.

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions