-
Notifications
You must be signed in to change notification settings - Fork 155
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
Config: Improve consistency between plugin and server mode #477
Conversation
src/config.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was splitted between config/*.ts
, plugin/v2/config.ts
and service/config.ts
files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a comment with a suggestion but PR looks good and it is consistent with the docs change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Leave one nit comment.
Hello, сould you give us an idea of when this improvement will be released? |
This PR refactor the configuration codebase to de-duplicate the code that handles setting the config via environment variables in plugin mode and in server mode.
It also improves the consistency between how you can configure the image renderer as a plugin and as a remote server with environment variables. This adds the following env variables:
RENDERING_LANGUAGE
(server mode)RENDERING_VIEWPORT_WIDTH
(server mode)RENDERING_VIEWPORT_HEIGHT
(server mode)RENDERING_VIEWPORT_DEVICE_SCALE_FACTOR
(server mode)RENDERING_VIEWPORT_MAX_WIDTH
(server mode)RENDERING_VIEWPORT_MAX_HEIGHT
(server mode)RENDERING_VIEWPORT_MAX_DEVICE_SCALE_FACTOR
(server mode)GF_PLUGIN_RENDERING_TIMING_METRICS
(plugin mode) andRENDERING_TIMING_METRICS
(server mode)Fixes #392 and fixes #317
Associated doc PR: grafana/grafana#77042