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

Allow yaml configuration file overrides per-service #1953

Closed
tatu-at-datastax opened this issue Jul 6, 2022 · 1 comment · Fixed by #1954
Closed

Allow yaml configuration file overrides per-service #1953

tatu-at-datastax opened this issue Jul 6, 2022 · 1 comment · Fixed by #1954
Assignees
Labels
stargate-v1 Issue that only applies to Stargate V1

Comments

@tatu-at-datastax
Copy link
Collaborator

Currently all Stargate V1 services are based on DropWizard, and include src/main/resources/config.yaml for their default settings. While these settings can theoretically be overridden with System Properties (-Ddw.http.port=8088), there is no prefixing to avoid changing settings for all.
Since yaml configuration files are baked in jars, changing them is difficult as well.

To support things like configuring https endpoints for services it makes sense to allow specifying alternate configuration files, on per-service basis. This can be done by, for example:

  1. Adding new System properties that, if specified, will point to file to read instead (./my-service-config/rest-config.yaml) of the default resource
  2. Using naming convention (for example [SERVICE-NAME]-config.yaml, like restapi-config.yaml) and check for existence of such file, and if found using as replacement

It seems simple enough to do both, in this order of precedence.

@tatu-at-datastax tatu-at-datastax added the stargate-v1 Issue that only applies to Stargate V1 label Jul 6, 2022
@tatu-at-datastax tatu-at-datastax self-assigned this Jul 6, 2022
@tatu-at-datastax
Copy link
Collaborator Author

Implementation of overrides ready, with tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stargate-v1 Issue that only applies to Stargate V1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant