Skip to content

Add an alert to warn about `gitops` keyword deprecation

What does this MR do and why?

This MR adds an alert on the Kubernetes clusters page to warn our users about the deprecation of the gitops keyword for the agent configuration.

We create a list of all agent configuration files that are present in the current project. Then, we request the raw files one by one and parse the response searching for the gitops keyword. We stop requesting files once the gitops keyword is found.

This way we can show the alert only to the users who are affected by the deprecation.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Screenshot_2024-02-01_at_23.43.08

How to set up and validate locally

  1. Visit Operate -> Kubernetes clusters page by clicking Connect a cluster button.
  2. Create a could of agents
  3. Add configuration files to the agents by creating the file under .gitlab/agents/<your-agent-name>/config.yaml
  4. Use gitops keyword in the yaml file, for example
    gitops:
      manifest_projects:
      - id: <your-project-path>
  5. Visit Operate -> Kubernetes clusters page again and verify the alert.

Related to #440179 (closed)

Merge request reports