Skip to content

Conversation

@vortegatorres
Copy link
Contributor

@vortegatorres vortegatorres commented Nov 25, 2025

What?

Docs for the new url secret-source implemented here: grafana/k6#5413

Checklist

  • I have used a meaningful title for the PR.
  • I have described the changes I've made in the "What?" section above.
  • I have performed a self-review of my changes.
  • I have run the npm start command locally and verified that the changes look good.
  • I have made my changes in the docs/sources/k6/next folder of the documentation.
  • I have reflected my changes in the docs/sources/k6/v{most_recent_release} folder of the documentation.
  • I have reflected my changes in the relevant folders of the two previous k6 versions of the documentation (if still applicable to previous versions).
  • I have made my changes in the docs/sources/k6/next folder of the documentation.

Related PR(s)/Issue(s)

grafana/k6#5412

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

Copilot AI left a 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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 25, 2025

💻 Deploy preview deleted ([docs] Add url secret-source docs).

@heitortsergent heitortsergent added the Area: OSS Content Improvements or additions to community/oss documentation label Nov 25, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@vortegatorres vortegatorres requested review from a team and yorugac as code owners November 25, 2025 22:44
@vortegatorres vortegatorres requested review from pablochacin and removed request for a team November 25, 2025 22:44
@oleiade
Copy link
Contributor

oleiade commented Nov 26, 2025

Hey @vortegatorres 👋🏻

It looks like you made your changes in a new v1.5.x folder.

However, the practice we're following is instead to make the changes in next, and backport the changes where relevant for previous releases documentation, as per the Pull Request template: https://github.com/grafana/k6-docs/blob/main/.github/pull_request_template.md?plain=1#L20.

Prior to release, the k6 team hand-in-hand with @heitortsergent will create the v1.5.x folder, once all the changes are documented.

Do you mind adapting the PR accordingly? 🙇🏻

@vortegatorres vortegatorres force-pushed the add-url-secret-source-docs branch from 9040ee6 to 17b477c Compare November 26, 2025 09:03
@vortegatorres
Copy link
Contributor Author

Hey @vortegatorres 👋🏻

It looks like you made your changes in a new v1.5.x folder.

However, the practice we're following is instead to make the changes in next, and backport the changes where relevant for previous releases documentation, as per the Pull Request template: https://github.com/grafana/k6-docs/blob/main/.github/pull_request_template.md?plain=1#L20.

Prior to release, the k6 team hand-in-hand with @heitortsergent will create the v1.5.x folder, once all the changes are documented.

Do you mind adapting the PR accordingly? 🙇🏻

@oleiade I updated the branch accordingly, thanks!

Copy link
Collaborator

@heitortsergent heitortsergent left a 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`) |
Copy link
Collaborator

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? 🤔

Copy link
Contributor Author

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.

Copy link
Collaborator

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? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, updated in e7abc20

vortegatorres and others added 5 commits December 3, 2025 07:33
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>
vortegatorres and others added 12 commits December 3, 2025 07:37
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>
Copy link
Collaborator

@heitortsergent heitortsergent left a 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! 🙇

@vortegatorres vortegatorres merged commit 7ff1deb into main Dec 4, 2025
8 of 9 checks passed
@vortegatorres vortegatorres deleted the add-url-secret-source-docs branch December 4, 2025 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: OSS Content Improvements or additions to community/oss documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants