Skip to content

[Question] Feature Flag support as AppConfigurationProvider does (in dotnet env) #120

@kimpenhaus

Description

@kimpenhaus

@linglingye001 maybe you can help me with this as well 🙂

we currently have theAzureAppConfigurationProvider used in our dotnet apps/code - we want to switch to configmaps built by AppConfiguration-KubernetesProvider. it looks like the only thing preventing us from doing so is that the structure of the feature flags written into the configmaps isn't compatible with the structure theAzureAppConfigurationProvider creates inside IConfigurationRoot.

from AzureAppConfigurationProvider:

Image

in configmaps:

Image

inside IConfiurationRoot with configmaps:

Image

what is the supposed way to handle this? we are currently using IConfigurationRoot with an extension method to check whether a feature is enabled. we combine feature flags from different providers - so the old structure the AzureAppConfigurationProvider gives is very welcome :)

public static bool IsFeatureEnabled(this IConfigurationRoot config, string feature)
        => config.GetValue<bool?>($"FeatureManagement:{feature}")
           ?? config.GetValue<bool?>($"Feature:{feature}")
           ?? throw new FeatureFlagConfigurationNotFoundException("Feature could not be found!").WithData("Feature", feature);

is it supposed to switch to the FeatureManager - as the feature_management created by the kubernetes provider meets the spec: https://github.com/microsoft/FeatureManagement/blob/main/Schema/FeatureManagement.v2.0.0.schema.json

thanks in advance for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions