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

Update environment variable naming convention #98

Merged
merged 1 commit into from Dec 13, 2023
Merged

Conversation

maxisam
Copy link
Owner

@maxisam maxisam commented Dec 13, 2023

Breaking Change

In this PR, there is a breaking change because the original solution doesn't work in real environment.

In bash, it is not possible to use "-" as environment name, so the new rules are

  • - will turn into _
  • double __ will be used as a separator

ex:
plan-name-with-dash

the env will be PLAN_NAME_WITH_DASH__SECTION_PROPERTY

Special Note

The secret needs to be in the config with a placeholder

eg:

target:
  password: "load from env"

Viper has a issue to handle this spf13/viper#761

It can handle it in version 1.8.1 but it also introduce another issue.

so we stick with version 1.6.0 and see what to do next.

@maxisam maxisam merged commit e27d75f into main Dec 13, 2023
4 checks passed
@maxisam maxisam deleted the fix/viper-issue branch December 13, 2023 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant