Skip to content

[ER]Support configuration of key features via config.yml (in addition to CLI/ENV) #1352

@fred-maussion

Description

@fred-maussion

Description

Currently, key features such as proxy mode, metrics, and APM can only be configured via environment variables or CLI arguments. While this works, many users expect a centralized and declarative approach using the config.yml file especially in environments relying on automation tools or GitOps practices.

Use case

SRE managing Elastic Package Registry in enterprise settings often rely on tools like Ansible, Puppet, or Terraform, which favor file-based configurations. Supporting these features in config.yml allows better integration with configuration management systems and improves maintainability and transparency of deployments.

Expected behavior

All configuration options currently exposed via environment variables or CLI flags should also be available through the config.yml file. This ensures a consistent configuration strategy across all environments.

Features to support in config.yml

features:
  proxy_mode:
    enabled: true
    proxy_to: https://epr.elastic.co

  metrics:
    address: "0.0.0.0:9000"

  apm:
    server_url: https://apm.elastic.co
    api_key: "<YOUR_API_KEY>"
    secret_token: "<YOUR_SECRET_TOKEN>"
    transaction_sample_rate: 0.2

Current environment variable equivalents

•	EPR_FEATURE_PROXY_MODE
•	EPR_PROXY_TO
•	EPR_METRICS_ADDRESS
•	ELASTIC_APM_SERVER_URL
•	ELASTIC_APM_API_KEY
•	ELASTIC_APM_SECRET_TOKEN
•	ELASTIC_APM_TRANSACTION_SAMPLE_RATE

Benefits

•	Enables declarative and version-controlled configuration
•	Facilitates integration with external automation and configuration tools
•	Aligns with expectations of enterprise and GitOps environments

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