Skip to content

Extract logs api into own grape module

Adrien Kohlbecker requested to merge ak/refactor into master

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

Availability and Testing

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 🤖

Merge request reports