Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support environment variables for config settings #181

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

viccuad
Copy link
Contributor

@viccuad viccuad commented Mar 5, 2025

Fix: #153.

Instead of adding a new --allow-download flag as stated on the issue, enable Viper to work with environment variables.

Kuberlr will honour environment variables with a name matching the key uppercased and prefixed with KUBRERLR (like KUBERLR_ALLOWDOWNLOAD) and use them for the config settings.

These environment variables take precedence over the config file settings.

Enable Viper to work with environment variables. Kuberlr will honour
environment variables with a name matching the key uppercased and
prefixed with `KUBRERLR` (like `KUBERLR_ALLOWDOWNLOAD`) and use them for
the config settings.

These environment variables take precedence over the config file
settings.

Signed-off-by: Víctor Cuadrado Juan <[email protected]>
Copy link

@jvanz jvanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Owner

@flavio flavio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@flavio flavio merged commit 18edcfb into flavio:main Mar 5, 2025
6 checks passed
@flavio
Copy link
Owner

flavio commented Mar 5, 2025

I've just tagged v0.6.0 which will include this feature.

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

Successfully merging this pull request may close these issues.

Feature request: Add --allow-download flag and its corresponding Viper env var
3 participants