Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Conversation

rybbchao
Copy link

@rybbchao rybbchao commented Feb 2, 2024

Add SigV4 support for grafana/k6#4584.

Environment variables:

  • K6_PROMETHEUS_RW_SIGV4_AUTH: Enable SigV4 for AWS Managed Prometheus.
  • K6_PROMETHEUS_RW_SIGV4_REGION: AWS region where the workspace is.
  • K6_PROMETHEUS_RW_SIGV4_ACCESS_KEY: AWS access key.
  • K6_PROMETHEUS_RW_SIGV4_SECRET_KEY: AWS secret key.
  • K6_PROMETHEUS_RW_SIGV4_PROFILE: AWS profile to use.
  • K6_PROMETHEUS_RW_SIGV4_ROLE_ARN: AWS role ARN to assume.

Note: Set AWS_SDK_LOAD_CONFIG to true for the shared config and credential files.

@rybbchao rybbchao requested a review from a team as a code owner February 2, 2024 10:09
@rybbchao rybbchao requested review from mstoykov and joanlopez and removed request for a team February 2, 2024 10:09
@CLAassistant
Copy link

CLAassistant commented Feb 2, 2024

CLA assistant check
All committers have signed the CLA.

@rybbchao rybbchao marked this pull request as draft February 2, 2024 11:05
@rybbchao rybbchao marked this pull request as ready for review February 2, 2024 11:35
@mstoykov
Copy link
Contributor

mstoykov commented Feb 8, 2024

Looking at teh amount of dependancies this pulls in ... I am concerned.

I did a quick check and this adds 7mb on top of k6 for this one authentication. +Every security alert we get about all of those dependancies.

GIven that this currently goes in k6 core I really would prefer not to merge this.

Some quick googling shows that there are ways to get the authenticaiton without pulling in the whole aws sdk and I would recommend we actually go down this route

https://gist.github.com/anandkunal/b67eb94454b77cfc2b50026989586cc0

cc @codebien

edit:

$ xk6 build --output k6-remote-one --with github.com/grafana/xk6-output-prometheus-remote@main $ xk6 build --output k6-remove-sigv4 --with github.com/grafana/xk6-output-prometheus-remote=github.com/rybbchao/xk6-output-prometheus-remote@1b6d8863e4f3c1ce91b1419185faad6bb5d865db $ ls -l k6-* -rwxr-xr-x. 1 mstoykov mstoykov 37511320 Feb 8 18:03 k6-remote-one -rwxr-xr-x. 1 mstoykov mstoykov 44818584 Feb 8 18:03 k6-remove-sigv4 
Copy link
Contributor

@codebien codebien left a comment

Choose a reason for hiding this comment

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

I agree, @rybbchao would you be interested in trying the path suggested by @mstoykov?

@rybbchao rybbchao marked this pull request as draft February 13, 2024 02:14
@codebien
Copy link
Contributor

codebien commented Jul 3, 2024

Hey @rybbchao,
I'm going to close this issue as it seems is not under active development. Feel free to re-open if you find the time to re-work the changes.

Thanks for your contribution 🙇

@codebien codebien closed this Jul 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
4 participants