Add internal API endpoint for agentw info
What does this MR do and why?
Add internal API endpoint for agentw info
See Add Rails endpoint to get agent info for agentw (#550130 - closed) • Chad Woolley • 18.4 for details
References
- Simplify Workspaces setup by removing GitLab Wo... (&16785) • Chad Woolley, Vishal Tak
- Add Rails endpoint to get agent info for agentw (#550130 - closed) • Chad Woolley • 18.4
- Based on original commit from spike/integration MR: Draft: Agentw Rails Integration MR for vtak - D... (!197262 - closed) • Vishal Tak
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
Full integration test
- Test using integration branch with the commits from this MR copied in: Draft: Agentw Rails Integration MR for vtak - D... (!197262 - closed)
- Docs for additional manual setup are in Add workspace tunnelling grpc service (gitlab-org/cluster-integration/gitlab-agent!2699 - merged) (work is in progress to get all of this configured automatically in the GDK).
Easier testing (skip KAS authentication)
If you just want to test the behavior in this MR without having to invoke it via KAS with the JWT authentication, you can do the following:
- Comment out the line
authenticate_gitlab_kas_request!in the endpoint gdk restart rails-web- Create a workspace, then get the token value of the associated WorkspaceToken
- curl the endpoint with the token value in the header.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Chad Woolley