vector icon indicating copy to clipboard operation
vector copied to clipboard

GCP sink proxy configuration not used

Open davidgcameron opened this issue 1 year ago • 0 comments

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

Setting proxy parameters in GCP sink configuration doesn't seem to have any effect. The only way to force vector to use a proxy is setting environment variables.

Configuration

sources:

  vector_logs:
    type: internal_logs

sinks:
  gcp:
    inputs: ["vector_logs"]
    type: gcp_cloud_storage
    batch:
      timeout_secs: 1
    credentials_path: /etc/vector/gcp_credentials.json
    encoding:
      codec: json
    bucket: dc_test
    proxy:
      enabled: true
      http: http://squid:3128
      https: http://squid:3128

Version

0.35.0

Debug Output

No response

Example Data

$ docker run --rm -v ./test.yml:/etc/vector/test.yml -v ./gcp_credentials.json:/etc/vector/gcp_credentials.json vector --config /etc/vector/test.yml 
2024-02-08T14:03:43.057799Z  INFO vector::app: Log level is enabled. level="info"
2024-02-08T14:03:43.058618Z  INFO vector::app: Loading configs. paths=["/etc/vector/test.yml"]
2024-02-08T14:03:53.359025Z ERROR vector::topology::builder: Configuration error. error=Sink "gcp": Failed to get OAuth token: error sending request for url (https://oauth2.googleapis.com/token): error trying to connect: tcp connect error: Network unreachable (os error 101)

After setting HTTPS_PROXY env var it works:

$ docker run -e HTTPS_PROXY=http://squid:3128 --rm -v ./test.yml:/etc/vector/test.yml -v ./gcp_credentials.json:/etc/vector/gcp_credentials.json vector --config /etc/vector/test.yml 
2024-02-08T14:04:49.971423Z  INFO vector::app: Log level is enabled. level="info"
2024-02-08T14:04:49.972907Z  INFO vector::app: Loading configs. paths=["/etc/vector/test.yml"]
2024-02-08T14:04:50.042882Z  INFO vector::topology::running: Running healthchecks.
2024-02-08T14:04:50.043130Z  INFO vector: Vector has started. debug="false" version="0.35.0" arch="x86_64" revision="e57c0c0 2024-01-08 14:42:10.103908779"
2024-02-08T14:04:50.043153Z  INFO vector::app: API is disabled, enable by setting `api.enabled` to `true` and use commands like `vector top`.
2024-02-08T14:04:50.150559Z  INFO vector::topology::builder: Healthcheck passed.

Additional Context

No response

References

No response

davidgcameron avatar Feb 08 '24 14:02 davidgcameron