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

docs: clarify feature flags config #71

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,23 @@ The individual modules like "Reporting" require some setup and environment varia

- **[Reporting](./docs/modules/reporting.md)**: Calculate aggregated reports and run queries on all data, accessible for external services for API integrations of systems
- **[Export](./docs/modules/export.md)**: Template based file export API. Uses [carbone.io](https://carbone.io) as templating engine.

_Modules have to be enabled via a feature flag in the environment config and may need additional environment variables (see module READMEs)._


-----
# Development

## Configuration through environment variables
Environment variables can be defined in an .env file using "snake case" variable names (see [examples/application.env](/docs/examples/application.env)).
These are transformed automatically to be available in the code as nested properties
Copy link
Member Author

Choose a reason for hiding this comment

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

Please confirm and/or elaborate, @tomwwinter .

The system and connections are not clear to me yet, that is why I want to add documentation for myself and other developers here


For example, `FEATURES_EXPORTAPI_ENABLED=true` in .env can toggle the feature flag
```
@ConditionalOnProperty(
prefix = "features.export-api",
name = ["enabled"],
havingValue = "true",
matchIfMissing = false
)
```
10 changes: 10 additions & 0 deletions docs/modules/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ REST controller responsible for handling export operations related to templates.
[export-api-v1.yaml](../api-specs/export-api-v1.yaml)

## Setup
This module has to be enabled through a feature flag in the environment:

in .env file:
`FEATURES_EXPORTAPI_ENABLED=true`
or as .yml:
```
features:
export-api:
enabled: true
```
Comment on lines +28 to +33
Copy link
Member Author

Choose a reason for hiding this comment

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

is this correct (and correctly spelled), @tomwwinter ?

I have seen this format somewhere but only found the .env format in production use. So this is just an assumption ...


Configure a compatible render api in the environment. You can use the default, aam-internal implementation,
but make sure, that the authentication is configured:
Expand Down