Skip to content

Enable dynamic configuration values to be retrieved based on a feature. #5

@jimmyca15

Description

@jimmyca15

Sometimes the addition of a new feature within an application might require altered/new configuration. This configuration is scoped to the feature itself and should not pollute the overall configuration of the application. A method should be established to allow applications to pull settings from the configuration system that may be altered based on a specific feature and whether it is enabled/disabled.

E.g. something like


{
  "MaxRequests": "100",
  "MaxRetries": "10",
  "FeatureManagement": {
    "Beta": {
      "EnabledFor": [
        {
          "Name": "Percentage",
          "Parameters": {
            "Value": "50"
          }
        }
      ],
      "Configuration': {
        "MaxRequests:" 500
      }
    }
}

Getting configuration normally would yield expected results

IConfiguration config;
config["MaxRequests"] // 100
config["MaxRetries"] // 10

Getting configuration with respect to the Beta feature would yield something like
IConfiguration betaAwareConfig
config["Maxrequests"] // 500
config["MaxRetries"] // 10

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Generally Available (Done)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions