Skip to content

(feature) Support environment variable expansion in configuration file #6117

Description

@AndrzejWisniewski

Requirements

I'm running the go-feature-flag relay proxy on Kubernetes, where our Slack webhook URL is stored as a Kubernetes Secret. The secret is injected into the container as an environment variable via secretKeyRef, making SLACK_WEBHOOK_URL available at runtime. However, there is no way to reference this environment variable from within goff-proxy.yml. We tried both ${SLACK_WEBHOOK_URL} and $SLACK_WEBHOOK_URL syntax in the webhookUrl field, but the relay proxy passes the literal string to the HTTP client without any expansion, resulting in Post $SLACK_WEBHOOK_URL: unsupported protocol scheme . Storing the webhook URL as a plain text value in a Git repository is not acceptable by me so that's why I'm asking for this feature.

I would like the relay proxy to support ${ENV_VAR} expansion when loading the configuration file, which could be implemented simply using os.ExpandEnv.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or requestneeds-triageA priority should be added to the issue

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions