-
Notifications
You must be signed in to change notification settings - Fork 251
[docs] Add url secret-source docs #2127
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
Conversation
|
|
1 similar comment
|
|
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.
Pull request overview
This PR adds comprehensive documentation for the new URL secret source feature in k6, which allows fetching secrets from HTTP endpoints. The documentation provides detailed configuration options, usage examples, and explains features like rate limiting and retry behavior.
Key Changes
- Added complete documentation for URL secret source with configuration methods (CLI, file-based, environment variables)
- Documented HTTP request features including custom headers, response path extraction, rate limiting, and automatic retries
- Provided multiple practical examples for common use cases
- Updated the secret source index to include the new URL source
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/sources/k6/next/using-k6/secret-source/url.md | New comprehensive documentation file for URL secret source feature with configuration options, examples, and usage patterns |
| docs/sources/k6/next/using-k6/secret-source/_index.md | Added URL secret source to the list of available built-in secret sources |
|
💻 Deploy preview deleted ([docs] Add url secret-source docs). |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Hey @vortegatorres 👋🏻 It looks like you made your changes in a new However, the practice we're following is instead to make the changes in Prior to release, the k6 team hand-in-hand with @heitortsergent will create the Do you mind adapting the PR accordingly? 🙇🏻 |
9040ee6 to
17b477c
Compare
@oleiade I updated the branch accordingly, thanks! |
heitortsergent
left a comment
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.
Thanks for opening the PR @vortegatorres! I left a few comments with some edits to make it fit our style guide.
| | `method` | string | `GET` | HTTP method to use | | ||
| | `headers.*` | string | - | Custom headers (e.g., `headers.Authorization=Bearer token`) | | ||
| | `responsePath` | string | - | JSON path to extract secret from response (empty = use entire response) | | ||
| | `timeout` | duration | `30s` | Request timeout (e.g., `30s`, `1m`, `500ms`) | |
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.
Is duration a type, or should we switch this to string? 🤔
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.
It is a type in Go, that is a string, but should contain a duration. I am not sure if I should use a string here.
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.
Oh, I see! Since these variables are being used in JS/TS, I think we should use string. What do you think? 🤔
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.
Thanks, updated in e7abc20
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
heitortsergent
left a comment
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, thanks for making all the changes! 🙇
What?
Docs for the new
urlsecret-source implemented here: grafana/k6#5413Checklist
npm startcommand locally and verified that the changes look good.docs/sources/k6/nextfolder of the documentation.docs/sources/k6/v{most_recent_release}folder of the documentation.docs/sources/k6/nextfolder of the documentation.Related PR(s)/Issue(s)
grafana/k6#5412