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: use env variable in yaml config files #8339

Merged
merged 1 commit into from
Feb 10, 2024
Merged

feat: use env variable in yaml config files #8339

merged 1 commit into from
Feb 10, 2024

Conversation

micbar
Copy link
Contributor

@micbar micbar commented Feb 1, 2024

Description

We added the ability to use environment variables in yaml config files. This allows to use environment variables in the config files of the ocis services which will be replaced by the actual value of the environment variable at runtime.

Example:

web:
  http:
    addr: ${SOME_HTTP_ADDR}

This makes it possible to use the same config file for different environments without the need to change the config file itself. This is especially useful when using docker-compose to run the ocis services. It is a common pattern to create an .env file which contains the environment variables for the docker-compose file. Now you can use the same .env file to configure the ocis services.

Related Issue

  • Fixes <issue_link>

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@micbar micbar marked this pull request as draft February 1, 2024 11:26
@micbar
Copy link
Contributor Author

micbar commented Feb 1, 2024

@mmattel @dragonchaser @kobergj

I suggest to hold this and not commit it to the 5.0.0 release.

@butonic
Copy link
Member

butonic commented Feb 2, 2024

@kobergj @dragonchaser I think we should merge this for OCIS v5. Existing yaml files will not contain any ${ENV_VAR} replacements or they would likely be failing anyways. If an admin wants to use them he has to check the env vars anyway. So this should go in sooner rather than later.

@mmattel
Copy link
Contributor

mmattel commented Feb 9, 2024

CI complains about a changlog issue

@micbar micbar marked this pull request as ready for review February 9, 2024 11:56
Copy link

sonarcloud bot commented Feb 9, 2024

@micbar micbar merged commit 4425ace into master Feb 10, 2024
4 checks passed
@delete-merged-branch delete-merged-branch bot deleted the add-env-in-yaml branch February 10, 2024 10:08
ownclouders pushed a commit that referenced this pull request Feb 10, 2024
feat: use env variable in yaml config files
@micbar micbar mentioned this pull request Feb 26, 2024
71 tasks
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

3 participants