Add support for pdc agent #328
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for the Secure SOCKS Proxy in the Grafana Trino plugin. This feature allows datasource connections to be proxied through a SOCKS5 proxy with TLS, enabling Grafana users to connect to Trino instances that reside in different networks than Grafana, even when opening ports to the public internet is not possible.
Implementation details
The feature is now available in Grafana OSS without a feature toggle. However, non-core datasources still use a feature toggle until the frontend dependency
@grafana/runtimeis upgraded to at least version 10.0.0. Once upgraded, we can switch this checkto `config.secureSocksDSProxyEnabled instead of using the feature toggle.
The grafana-plugin-sdk injects variables into the context. To build the proxy settings here
, the context needs to be injected in
main.go.Apart from updating
sqlds, changes to the backend are minimal, sincegrafana-plugin-sdkhandles most of the heavy lifting, and Trino supports custom clients.Considerations
- The HTTP client used to communicate with the coordinator is the same one used to fetch spooled segments. When the proxy is enabled, all traffic goes through the proxy. If the proxy resides in a private network, it may not be able to fetch data from external storage, such as S3 buckets.
Screenshot of config page
Screenshot showing the traffic going through proxy
This PR close issue #312