Extract logs api into own grape module
What does this MR do?
This MR is the controller part of the refactoring first identified here #39092 (closed). A separate MR is improving the service side of things !23619 (merged)
- Moves the logs API to a grape module.
- Changes the routing to use cluster+namespace rather than environment, to better reflect the underlying model, and be compatible with exposing
gitlab-managed-apps
logs later (see #31105 (closed)). A further MR will propagate this change to the service itself. - The new path is
/api/v4/clusters/:cluster_id/namespace/:namespace/logs/{kubernetes,elasticsearch}.json
- Pass the new API url to the frontend, rather than have the frontend build the URL manually
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖